10
10
#include " include/v8-inspector.h"
11
11
#include " src/inspector/v8-console-message.h"
12
12
13
+ #include " ns-v8-tracing-agent-impl.h"
13
14
#include " runtime/Runtime.h"
14
15
15
16
namespace v8_inspector {
@@ -46,14 +47,18 @@ class JsV8InspectorClient : V8InspectorClient, V8Inspector::Channel {
46
47
v8::Persistent<v8::Context> context_;
47
48
std::unique_ptr<V8InspectorSession> session_;
48
49
tns::Runtime* runtime_;
50
+ v8::Isolate* isolate_;
49
51
bool terminated_;
50
- std::vector <std::string> messages_;
52
+ std::queue <std::string> messages_;
51
53
bool runningNestedLoops_;
52
54
dispatch_queue_t messagesQueue_;
53
55
dispatch_queue_t messageLoopQueue_;
54
56
dispatch_semaphore_t messageArrived_;
55
57
std::function<void (std::string)> sender_;
56
58
bool isWaitingForDebugger_;
59
+ bool hasScheduledDebugBreak_;
60
+
61
+ std::unique_ptr<tns::inspector::TracingAgentImpl> tracing_agent_;
57
62
58
63
// Override of V8InspectorClient
59
64
v8::Local<v8::Context> ensureDefaultContextInGroup (int contextGroupId) override ;
@@ -67,6 +72,14 @@ class JsV8InspectorClient : V8InspectorClient, V8Inspector::Channel {
67
72
static void registerDomainDispatcherCallback (const v8::FunctionCallbackInfo<v8::Value>& args);
68
73
static void inspectorSendEventCallback (const v8::FunctionCallbackInfo<v8::Value>& args);
69
74
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);
70
83
};
71
84
72
85
}
0 commit comments