src: fix domains + --abort-on-uncaught-exception by chrisdickinson · Pull Request #922 · nodejs/node

added 5 commits

February 22, 2015 14:58
If run with --abort-on-uncaught-exception, V8 will abort the process
whenever it does not see a JS-installed CatchClause in the stack. C++
TryCatch clauses are ignored. Domains work by setting a FatalException
handler which is ignored when running in abort mode.

This patch modifies MakeCallback to call its target function through a
JS function that installs a CatchClause and manually calls _fatalException
on error, if the process is both using domains and is in abort mode.

Fixes: #836

@chrisdickinson

@chrisdickinson

chrisdickinson added a commit that referenced this pull request

Feb 25, 2015
If run with --abort-on-uncaught-exception, V8 will abort the process
whenever it does not see a JS-installed CatchClause in the stack. C++
TryCatch clauses are ignored. Domains work by setting a FatalException
handler which is ignored when running in abort mode.

This patch modifies MakeCallback to call its target function through a
JS function that installs a CatchClause and manually calls _fatalException
on error, if the process is both using domains and is in abort mode.

Semver: patch
PR-URL: #922
Fixes: #836
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>

@rvagg rvagg mentioned this pull request

Feb 26, 2015