diff options
Diffstat (limited to 'src/inspector_agent.h')
-rw-r--r-- | src/inspector_agent.h | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/src/inspector_agent.h b/src/inspector_agent.h index cf9a8bff86..6ec1bc28dc 100644 --- a/src/inspector_agent.h +++ b/src/inspector_agent.h @@ -16,17 +16,7 @@ namespace node { class Environment; } // namespace node -namespace v8 { -class Context; -template <typename V> -class FunctionCallbackInfo; -template<typename T> -class Local; -class Message; -class Object; -class Platform; -class Value; -} // namespace v8 +#include "v8.h" namespace v8_inspector { class StringView; @@ -67,6 +57,18 @@ class Agent { void FatalException(v8::Local<v8::Value> error, v8::Local<v8::Message> message); + // Async stack traces instrumentation. + void AsyncTaskScheduled(const v8_inspector::StringView& taskName, void* task, + bool recurring); + void AsyncTaskCanceled(void* task); + void AsyncTaskStarted(void* task); + void AsyncTaskFinished(void* task); + void AllAsyncTasksCanceled(); + + void RegisterAsyncHook(v8::Isolate* isolate, + v8::Local<v8::Function> enable_function, + v8::Local<v8::Function> disable_function); + // These methods are called by the WS protocol and JS binding to create // inspector sessions. The inspector responds by using the delegate to send // messages back. @@ -107,6 +109,9 @@ class Agent { std::string path_; DebugOptions debug_options_; int next_context_number_; + + v8::Persistent<v8::Function> enable_async_hook_function_; + v8::Persistent<v8::Function> disable_async_hook_function_; }; } // namespace inspector |