Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(270)

Unified Diff: src/inspector/v8-debugger.h

Issue 2622253004: [inspector] introduced debug::SetBreakEventListener,SetExceptionEventListener (Closed)
Patch Set: fixed compilation Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/inspector/v8-debugger.h
diff --git a/src/inspector/v8-debugger.h b/src/inspector/v8-debugger.h
index 0132b370fe3bab13a734be6aef46e07e3f47701c..edac95c5cc27d5a20778db42c45c80fa2aadb2ec 100644
--- a/src/inspector/v8-debugger.h
+++ b/src/inspector/v8-debugger.h
@@ -26,7 +26,7 @@ class V8StackTraceImpl;
using protocol::Response;
-class V8Debugger {
+class V8Debugger : public v8::debug::DebugEventListener {
public:
V8Debugger(v8::Isolate*, V8InspectorImpl*);
~V8Debugger();
@@ -95,6 +95,18 @@ class V8Debugger {
void setMaxAsyncTaskStacksForTest(int limit) { m_maxAsyncCallStacks = limit; }
+ void OnAsyncTaskEvent(v8::debug::PromiseDebugActionType type,
dgozman 2017/01/18 18:43:05 // v8::debug::DebugEventListener implementation.
kozy 2017/01/18 21:20:07 Done.
+ int id) override;
+ void OnCompileEvent(v8::Local<v8::debug::Script> script,
+ bool has_compile_error) override;
+ void OnBreakEvent(v8::Local<v8::Context> paused_context,
+ v8::Local<v8::Object> exec_state,
+ v8::Local<v8::Value> break_points_hit) override;
+ void OnExceptionEvent(v8::Local<v8::Context> paused_context,
+ v8::Local<v8::Object> exec_state,
+ v8::Local<v8::Value> exception,
+ bool is_promise_rejection, bool is_uncaught) override;
+
private:
void compileDebuggerScript();
v8::MaybeLocal<v8::Value> callDebuggerMethod(const char* functionName,
@@ -110,14 +122,6 @@ class V8Debugger {
v8::Local<v8::Array> hitBreakpoints,
bool isPromiseRejection = false,
bool isUncaught = false);
- static void v8DebugEventCallback(const v8::debug::EventDetails&);
- v8::Local<v8::Value> callInternalGetterFunction(v8::Local<v8::Object>,
- const char* functionName);
- void handleV8DebugEvent(const v8::debug::EventDetails&);
- static void v8AsyncTaskListener(v8::debug::PromiseDebugActionType type,
- int id, void* data);
- static void v8CompileEventListener(v8::Local<v8::debug::Script> script,
- bool has_compile_error, void* data);
v8::Local<v8::Value> collectionEntries(v8::Local<v8::Context>,
v8::Local<v8::Object>);

Powered by Google App Engine
This is Rietveld 408576698