diff options
author | Eugene Ostroukhov <eostroukhov@chromium.org> | 2016-12-13 04:08:31 +0300 |
---|---|---|
committer | Eugene Ostroukhov <eostroukhov@chromium.org> | 2017-04-06 19:10:29 +0300 |
commit | 7599b0ef9dcd28dd47e0c876cf51bf65fa15c73d (patch) | |
tree | 5ba8773aaa247b27dfc24824a1ffc4a78fae4f32 /src/inspector_agent.h | |
parent | 47f8f7462fb198aa27ede602c43786bdbfda37a2 (diff) |
debug: activate inspector with _debugProcess
This pull request switches the signal handler to start inspector socket
server instead of the legacy V8 debug protocol.
PR-URL: https://github.com/nodejs/node/pull/11431
Fixes: https://github.com/nodejs/node/issues/8464
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'src/inspector_agent.h')
-rw-r--r-- | src/inspector_agent.h | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/inspector_agent.h b/src/inspector_agent.h index 50575d7c282..141998a064a 100644 --- a/src/inspector_agent.h +++ b/src/inspector_agent.h @@ -22,20 +22,28 @@ class Value; class Message; } // namespace v8 +namespace v8_inspector { +class StringView; +} // namespace v8_inspector + namespace node { namespace inspector { class AgentImpl; +class InspectorSessionDelegate { + public: + virtual bool WaitForFrontendMessage() = 0; + virtual void OnMessage(const v8_inspector::StringView& message) = 0; +}; + class Agent { public: explicit Agent(node::Environment* env); ~Agent(); - // Start the inspector agent thread bool Start(v8::Platform* platform, const char* path, const DebugOptions& options); - // Stop the inspector agent void Stop(); bool IsStarted(); @@ -44,8 +52,14 @@ class Agent { void FatalException(v8::Local<v8::Value> error, v8::Local<v8::Message> message); void SchedulePauseOnNextStatement(const std::string& reason); + void Connect(InspectorSessionDelegate* delegate); + void Disconnect(); + void Dispatch(const v8_inspector::StringView& message); + InspectorSessionDelegate* delegate(); + void RunMessageLoop(); private: AgentImpl* impl; + friend class AgentImpl; }; } // namespace inspector |