-
Notifications
You must be signed in to change notification settings - Fork 30k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
repl: give repl entries unique names
This is a workaround for the REPL for a problem when multiple of the entries have the same source text Fixes: #1337 Refs: https://bugs.chromium.org/p/v8/issues/detail?id=10284 PR-URL: #34372 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Anto Aravinth <[email protected]>
- Loading branch information
1 parent
c8a7789
commit 70768ce
Showing
4 changed files
with
43 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
'use strict'; | ||
const common = require('../common'); | ||
const assert = require('assert'); | ||
const child_process = require('child_process'); | ||
const child = child_process.spawn(process.execPath, [ | ||
'--interactive', | ||
'--expose-gc' | ||
], { | ||
stdio: 'pipe' | ||
}); | ||
child.stdin.write('\nimport("fs");\n_.then(gc);\n'); | ||
// Wait for concurrent GC to finish | ||
setTimeout(() => { | ||
child.stdin.write('\nimport("fs");\n'); | ||
child.stdin.write('\nprocess.exit(0);\n'); | ||
}, common.platformTimeout(50)); | ||
child.on('exit', (code, signal) => { | ||
assert.strictEqual(code, 0); | ||
assert.strictEqual(signal, null); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters