diff options
author | Joyee Cheung <joyeec9h3@gmail.com> | 2019-03-26 23:03:27 +0300 |
---|---|---|
committer | Joyee Cheung <joyeec9h3@gmail.com> | 2019-03-30 06:37:21 +0300 |
commit | 7aad63ba349d7b9b0eda4149d236ee66e5a26401 (patch) | |
tree | 7f6f08393640e77001b97948227ce1da6b33c848 /lib/internal/main | |
parent | 58bf61524df078ed2563725aa5e982bed51a4853 (diff) |
src: do not call into JS in the maxAsyncCallStackDepthChanged interrupt
If Debugger.setAsyncCallStackDepth is sent during bootstrap,
we cannot immediately call into JS to enable the hooks, which could
interrupt the JS execution of bootstrap. So instead we save the
notification in the inspector agent if it's sent in the middle of
bootstrap, and process the notification later here.
Refs: https://github.com/nodejs/node/issues/26798
PR-URL: https://github.com/nodejs/node/pull/26935
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Diffstat (limited to 'lib/internal/main')
-rw-r--r-- | lib/internal/main/worker_thread.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/internal/main/worker_thread.js b/lib/internal/main/worker_thread.js index fd3502e0784..71babafd0e8 100644 --- a/lib/internal/main/worker_thread.js +++ b/lib/internal/main/worker_thread.js @@ -6,6 +6,7 @@ const { patchProcessObject, setupCoverageHooks, + setupInspectorHooks, setupWarningHandler, setupDebugEnv, initializeDeprecations, @@ -43,6 +44,7 @@ const { const publicWorker = require('worker_threads'); patchProcessObject(); +setupInspectorHooks(); setupDebugEnv(); const debug = require('internal/util/debuglog').debuglog('worker'); |