diff options
author | Anna Henningsen <anna@addaleax.net> | 2018-12-19 23:07:53 +0100 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2018-12-31 01:10:35 +0100 |
commit | a84e0ec0dd20d0585d5c626f7ba333eb38d2221a (patch) | |
tree | 5802ed50644cace779605cc1af23856b1defc59c /src/node_errors.cc | |
parent | 4100001624a4cc88c61143e2678bf80c2aacd922 (diff) | |
download | android-node-v8-a84e0ec0dd20d0585d5c626f7ba333eb38d2221a.tar.gz android-node-v8-a84e0ec0dd20d0585d5c626f7ba333eb38d2221a.tar.bz2 android-node-v8-a84e0ec0dd20d0585d5c626f7ba333eb38d2221a.zip |
src: ignore termination exceptions in fatal TryCatch
We don’t want these to terminate the process in case of
Worker threads receiving a termination exception, rather
than a “real one”.
PR-URL: https://github.com/nodejs/node/pull/25141
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Diffstat (limited to 'src/node_errors.cc')
-rw-r--r-- | src/node_errors.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/node_errors.cc b/src/node_errors.cc index b7f7f59e70..7775e36b69 100644 --- a/src/node_errors.cc +++ b/src/node_errors.cc @@ -315,7 +315,7 @@ void OnFatalError(const char* location, const char* message) { namespace errors { TryCatchScope::~TryCatchScope() { - if (HasCaught() && mode_ == CatchMode::kFatal) { + if (HasCaught() && !HasTerminated() && mode_ == CatchMode::kFatal) { HandleScope scope(env_->isolate()); ReportException(env_, Exception(), Message()); exit(7); |