diff options
author | Chris Dickinson <christopher.s.dickinson@gmail.com> | 2015-02-23 01:54:25 +0300 |
---|---|---|
committer | Chris Dickinson <christopher.s.dickinson@gmail.com> | 2015-02-26 01:01:29 +0300 |
commit | 0af4c9ea7434e4f505dbe071357e4bc3b4ab2a8a (patch) | |
tree | 1cf138f18ca90b5262abe9c2c9f3b16482740011 /src/env.h | |
parent | 2ca22aacbdd11c572e71ee1b15af3bec1e04a0c1 (diff) |
src: fix domains + --abort-on-uncaught-exception
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: https://github.com/iojs/io.js/pull/922
Fixes: https://github.com/iojs/io.js/issues/836
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'src/env.h')
-rw-r--r-- | src/env.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/env.h b/src/env.h index 74544e43d51..73940ad0d48 100644 --- a/src/env.h +++ b/src/env.h @@ -67,6 +67,7 @@ namespace node { V(dev_string, "dev") \ V(disposed_string, "_disposed") \ V(domain_string, "domain") \ + V(domain_abort_uncaught_exc_string, "_makeCallbackAbortOnUncaught") \ V(exchange_string, "exchange") \ V(idle_string, "idle") \ V(irq_string, "irq") \ @@ -402,6 +403,9 @@ class Environment { inline bool using_smalloc_alloc_cb() const; inline void set_using_smalloc_alloc_cb(bool value); + inline bool using_abort_on_uncaught_exc() const; + inline void set_using_abort_on_uncaught_exc(bool value); + inline bool using_domains() const; inline void set_using_domains(bool value); @@ -496,6 +500,7 @@ class Environment { ares_task_list cares_task_list_; bool using_smalloc_alloc_cb_; bool using_domains_; + bool using_abort_on_uncaught_exc_; bool using_asyncwrap_; bool printed_error_; debugger::Agent debugger_agent_; |