diff options
author | Timothy Gu <timothygu99@gmail.com> | 2017-12-17 13:38:15 -0800 |
---|---|---|
committer | Timothy Gu <timothygu99@gmail.com> | 2017-12-23 14:05:18 +0800 |
commit | 2cb21451627a24be2bdeaee276d47ff94b15539e (patch) | |
tree | 42dc38919994b73d408e0af6eec72a817c98df4e /src/inspector_agent.h | |
parent | c339931d8b3dbf3fb2a4fa4164bbf585759831c0 (diff) | |
download | node-new-2cb21451627a24be2bdeaee276d47ff94b15539e.tar.gz |
vm: allow modifying context name in inspector
The `auxData` field is not exposed to JavaScript, as DevTools uses it
for its `isDefault` parameter, which is implemented faithfully,
contributing to the nice indentation in the context selection panel.
Without the indentation, when `Target` domain gets implemented (along
with a single Inspector for cluster) in #16627, subprocesses and VM
contexts will be mixed up, causing confusion.
PR-URL: https://github.com/nodejs/node/pull/17720
Refs: https://github.com/nodejs/node/pull/14231#issuecomment-315924067
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jon Moss <me@jonathanmoss.me>
Reviewed-By: James M Snell <jasnell@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 a2d61d0c8d..1d632ea8f8 100644 --- a/src/inspector_agent.h +++ b/src/inspector_agent.h @@ -20,6 +20,7 @@ class StringView; namespace node { // Forward declaration to break recursive dependency chain with src/env.h. class Environment; +struct ContextInfo; namespace inspector { @@ -89,7 +90,7 @@ class Agent { void RequestIoThreadStart(); DebugOptions& options() { return debug_options_; } - void ContextCreated(v8::Local<v8::Context> context); + void ContextCreated(v8::Local<v8::Context> context, const ContextInfo& info); void EnableAsyncHook(); void DisableAsyncHook(); @@ -105,7 +106,6 @@ class Agent { bool enabled_; std::string path_; DebugOptions debug_options_; - int next_context_number_; bool pending_enable_async_hook_; bool pending_disable_async_hook_; |