1010#include " include/v8-inspector.h"
1111#include " src/inspector/v8-console-message.h"
1212
13+ #include " ns-v8-tracing-agent-impl.h"
1314#include " runtime/Runtime.h"
1415
1516namespace v8_inspector {
@@ -46,14 +47,18 @@ class JsV8InspectorClient : V8InspectorClient, V8Inspector::Channel {
4647 v8::Persistent<v8::Context> context_;
4748 std::unique_ptr<V8InspectorSession> session_;
4849 tns::Runtime* runtime_;
50+ v8::Isolate* isolate_;
4951 bool terminated_;
50- std::vector <std::string> messages_;
52+ std::queue <std::string> messages_;
5153 bool runningNestedLoops_;
5254 dispatch_queue_t messagesQueue_;
5355 dispatch_queue_t messageLoopQueue_;
5456 dispatch_semaphore_t messageArrived_;
5557 std::function<void (std::string)> sender_;
5658 bool isWaitingForDebugger_;
59+ bool hasScheduledDebugBreak_;
60+
61+ std::unique_ptr<tns::inspector::TracingAgentImpl> tracing_agent_;
5762
5863 // Override of V8InspectorClient
5964 v8::Local<v8::Context> ensureDefaultContextInGroup (int contextGroupId) override ;
@@ -67,6 +72,14 @@ class JsV8InspectorClient : V8InspectorClient, V8Inspector::Channel {
6772 static void registerDomainDispatcherCallback (const v8::FunctionCallbackInfo<v8::Value>& args);
6873 static void inspectorSendEventCallback (const v8::FunctionCallbackInfo<v8::Value>& args);
6974 static void inspectorTimestampCallback (const v8::FunctionCallbackInfo<v8::Value>& args);
75+
76+ // {N} specific helpers
77+ bool CallDomainHandlerFunction (v8::Local<v8::Context> context,
78+ v8::Local<v8::Function> domainMethodFunc,
79+ const v8::Local<v8::Object>& arg,
80+ v8::Local<v8::Object>& domainDebugger,
81+ v8::Local<v8::Value>& result);
82+ std::string GetReturnMessageFromDomainHandlerResult (const v8::Local<v8::Value>& result, const v8::Local<v8::Value>& requestId);
7083};
7184
7285}
0 commit comments