summaryrefslogtreecommitdiff
path: root/lib/internal/inspector_async_hook.js
diff options
context:
space:
mode:
authorAli Ijaz Sheikh <ofrobots@google.com>2017-10-18 16:00:03 -0700
committerAli Ijaz Sheikh <ofrobots@google.com>2017-10-29 09:38:37 -0700
commit5886e204f04013879c00aca5ab653c16bef5befc (patch)
tree452bfe3e5f7b090bedd2528c31080e250467e334 /lib/internal/inspector_async_hook.js
parentc08750275882f1472f7ff2a98916f857a0857dc6 (diff)
downloadandroid-node-v8-5886e204f04013879c00aca5ab653c16bef5befc.tar.gz
android-node-v8-5886e204f04013879c00aca5ab653c16bef5befc.tar.bz2
android-node-v8-5886e204f04013879c00aca5ab653c16bef5befc.zip
inspector: track async stacks when necessary
With this change, we do async stack tracking only when explicitly requested by the inspector client. This avoids unnecessary overhead for clients that might not be interested in async stack traces. PR-URL: https://github.com/nodejs/node/pull/16308 Fixes: https://github.com/nodejs/node/issues/16180 Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Diffstat (limited to 'lib/internal/inspector_async_hook.js')
-rw-r--r--lib/internal/inspector_async_hook.js6
1 files changed, 0 insertions, 6 deletions
diff --git a/lib/internal/inspector_async_hook.js b/lib/internal/inspector_async_hook.js
index e32a026cd6..4ccf862697 100644
--- a/lib/internal/inspector_async_hook.js
+++ b/lib/internal/inspector_async_hook.js
@@ -55,10 +55,4 @@ function disable() {
exports.setup = function() {
inspector.registerAsyncHook(enable, disable);
-
- if (inspector.isEnabled()) {
- // If the inspector was already enabled via --inspect or --inspect-brk,
- // the we need to enable the async hook immediately at startup.
- enable();
- }
};