diff options
author | Joyee Cheung <joyeec9h3@gmail.com> | 2019-09-19 05:36:02 +0300 |
---|---|---|
committer | Benjamin Coe <bencoe@google.com> | 2019-09-24 19:55:00 +0300 |
commit | b2634238d8d50e3801cb716e3f3165be1c50418a (patch) | |
tree | 8d8d0828cbdd8feef99fe663b16ae7fc0e627dd5 /src/node_errors.cc | |
parent | c5f5f84a33967862036c7d87f4bbde6a59d3820a (diff) |
src: disconnect inspector before exiting out of fatal exception
So that coverage, .etc are properly written in case of a normal
fatal exception.
PR-URL: https://github.com/nodejs/node/pull/29611
Fixes: https://github.com/nodejs/node/issues/29570
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Ben Coe <bencoe@gmail.com>
Diffstat (limited to 'src/node_errors.cc')
-rw-r--r-- | src/node_errors.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/node_errors.cc b/src/node_errors.cc index 0214521144c..b33e4936ae7 100644 --- a/src/node_errors.cc +++ b/src/node_errors.cc @@ -978,6 +978,9 @@ void TriggerUncaughtException(Isolate* isolate, // Now we are certain that the exception is fatal. ReportFatalException(env, error, message, EnhanceFatalException::kEnhance); +#if HAVE_INSPECTOR + profiler::EndStartedProfilers(env); +#endif // If the global uncaught exception handler sets process.exitCode, // exit with that code. Otherwise, exit with 1. |