From 3f48ab30420981f888ff2c69fc1ea5abb37f3f2e Mon Sep 17 00:00:00 2001 From: Eugene Ostroukhov Date: Tue, 25 Apr 2017 14:55:55 -0700 Subject: inspector: do not add 'inspector' property 'inspector' property is not an official API and should not be published on process object, where the user may discover it. This change was extracted from https://github.com/nodejs/node/pull/12263 that will be focused on creating JS bindings. PR-URL: https://github.com/nodejs/node/pull/12656 Reviewed-By: Aleksey Kozyatinskiy Reviewed-By: James M Snell Reviewed-By: Timothy Gu --- src/inspector_agent.h | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'src/inspector_agent.h') diff --git a/src/inspector_agent.h b/src/inspector_agent.h index 483ac52b55..a939f6c6ba 100644 --- a/src/inspector_agent.h +++ b/src/inspector_agent.h @@ -17,11 +17,13 @@ class Environment; } // namespace node namespace v8 { +class Context; template class FunctionCallbackInfo; template class Local; class Message; +class Object; class Platform; class Value; } // namespace v8 @@ -61,19 +63,21 @@ class Agent { void Disconnect(); void Dispatch(const v8_inspector::StringView& message); void RunMessageLoop(); + bool enabled() { + return enabled_; + } + void PauseOnNextJavascriptStatement(const std::string& reason); + static void InitJSBindings(v8::Local target, + v8::Local unused, + v8::Local context, + void* priv); private: - static void CallAndPauseOnStart(const v8::FunctionCallbackInfo&); - static void InspectorConsoleCall( - const v8::FunctionCallbackInfo& info); - static void InspectorWrapConsoleCall( - const v8::FunctionCallbackInfo& info); - node::Environment* parent_env_; std::unique_ptr inspector_; std::unique_ptr io_; v8::Platform* platform_; - bool inspector_console_; + bool enabled_; std::string path_; DebugOptions debug_options_; }; -- cgit v1.2.3