diff options
author | Joyee Cheung <joyeec9h3@gmail.com> | 2019-06-20 07:13:26 +0800 |
---|---|---|
committer | Joyee Cheung <joyeec9h3@gmail.com> | 2019-06-27 20:22:08 +0800 |
commit | 94454927f697840a25c1ae73ebbcf9a5324b9060 (patch) | |
tree | 14d7579730ebbaf77d5f9b6945bbf408457b76e4 /src/inspector_agent.h | |
parent | ed8fc7e11d688cbcdf33d0d149830064758bdcd2 (diff) | |
download | node-new-94454927f697840a25c1ae73ebbcf9a5324b9060.tar.gz |
process: split routines used to enhance fatal exception stack traces
Previously the enhancement were done right after emitting
`'uncaughtException'`, which meant by the time we knew the
exception was fatal in C++, the error.stack had already been
patched.
This patch moves those routines to be called later during the
fatal exception handling, and split them into two stages:
before and after the inspector is notified by the invocation of
`V8Inspector::exceptionThrown`. We now expand the stack to include
additional informations about unhandled 'error' events before
the inspector is notified, but delay the highlighting of the
frames until after the inspector is notified, so that the
ANSI escape sequences won't show up in the inspector console.
PR-URL: https://github.com/nodejs/node/pull/28308
Fixes: https://github.com/nodejs/node/issues/28287
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Diffstat (limited to 'src/inspector_agent.h')
-rw-r--r-- | src/inspector_agent.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/inspector_agent.h b/src/inspector_agent.h index 1c2bde0da7..5447a68485 100644 --- a/src/inspector_agent.h +++ b/src/inspector_agent.h @@ -65,8 +65,8 @@ class Agent { void WaitForConnect(); // Blocks till all the sessions with "WaitForDisconnectOnShutdown" disconnect void WaitForDisconnect(); - void FatalException(v8::Local<v8::Value> error, - v8::Local<v8::Message> message); + void ReportUncaughtException(v8::Local<v8::Value> error, + v8::Local<v8::Message> message); // Async stack traces instrumentation. void AsyncTaskScheduled(const v8_inspector::StringView& taskName, void* task, |