-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
src: honor --abort_on_uncaught_exception flag
Fix regression introduced in 0af4c9e that ignores the --abort-on-uncaught-exception flag. Prior to that commit, the flag was passed through to v8. After that commit, the process just calls exit(1). PR-URL: #2776 Reviewed-By: Sakthipriyan Vairamani <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Brian White <[email protected]> Reviewed-by: Trevor Norris <[email protected]>
- Loading branch information
Showing
2 changed files
with
36 additions
and
1 deletion.
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,31 @@ | ||
'use strict'; | ||
|
||
const common = require('../common'); | ||
const assert = require('assert'); | ||
const spawn = require('child_process').spawn; | ||
const node = process.execPath; | ||
|
||
if (process.argv[2] === 'child') { | ||
throw new Error('child error'); | ||
} else { | ||
run('', null); | ||
run('--abort-on-uncaught-exception', 'SIGABRT'); | ||
} | ||
|
||
function run(flags, signal) { | ||
const args = [__filename, 'child']; | ||
if (flags) | ||
args.unshift(flags); | ||
|
||
const child = spawn(node, args); | ||
child.on('exit', common.mustCall(function(code, sig) { | ||
if (!common.isWindows) { | ||
assert.strictEqual(sig, signal); | ||
} else { | ||
if (signal) | ||
assert.strictEqual(code, 3); | ||
else | ||
assert.strictEqual(code, 1); | ||
} | ||
})); | ||
} |