1 #ifndef SRC_INSPECTOR_AGENT_H_ 2 #define SRC_INSPECTOR_AGENT_H_ 9 #error("This header can only be used when inspector is enabled") 32 virtual bool WaitForFrontendMessageWhilePaused() = 0;
33 virtual void SendMessageToFrontend(
const v8_inspector::StringView& message)
42 explicit Agent(node::Environment* env);
57 void WaitForDisconnect();
59 v8::Local<v8::Message> message);
62 void AsyncTaskScheduled(
const v8_inspector::StringView& taskName,
void* task,
64 void AsyncTaskCanceled(
void* task);
65 void AsyncTaskStarted(
void* task);
66 void AsyncTaskFinished(
void* task);
67 void AllAsyncTasksCanceled();
69 void RegisterAsyncHook(v8::Isolate* isolate,
70 v8::Local<v8::Function> enable_function,
71 v8::Local<v8::Function> disable_function);
78 void Dispatch(
const v8_inspector::StringView& message);
81 void RunMessageLoop();
83 void PauseOnNextJavascriptStatement(
const std::string& reason);
86 static void InitInspector(v8::Local<v8::Object> target,
87 v8::Local<v8::Value> unused,
88 v8::Local<v8::Context> context,
96 bool StartIoThread(
bool wait_for_connect);
99 void RequestIoThreadStart();
102 void ContextCreated(v8::Local<v8::Context> context);
105 node::Environment* parent_env_;
106 std::unique_ptr<NodeInspectorClient> client_;
107 std::unique_ptr<InspectorIo> io_;
108 v8::Platform* platform_;
112 int next_context_number_;
114 v8::Persistent<v8::Function> enable_async_hook_function_;
115 v8::Persistent<v8::Function> disable_async_hook_function_;
121 #endif // SRC_INSPECTOR_AGENT_H_
void FatalException(Isolate *isolate, Local< Value > error, Local< Message > message)
int Start(Isolate *isolate, IsolateData *isolate_data, int argc, const char *const *argv, int exec_argc, const char *const *exec_argv)