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

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

Issue 2622253004: [inspector] introduced debug::SetBreakEventListener,SetExceptionEventListener (Closed)
Patch Set: addressed comments 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 2620634d5b26ce5f9cf3094be3793fdd651f0c83..1f327c67d1f566ebbfc206ba576ab25d07250673 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();
@@ -112,14 +112,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>);
@@ -141,6 +133,19 @@ class V8Debugger {
v8::MaybeLocal<v8::Value> generatorScopes(v8::Local<v8::Context>,
v8::Local<v8::Value>);
+ // v8::debug::DebugEventListener implementation.
+ void PromiseEventOccurred(v8::debug::PromiseDebugActionType type,
+ int id) override;
+ void ScriptCompiled(v8::Local<v8::debug::Script> script,
+ bool has_compile_error) override;
+ void BreakProgramRequested(v8::Local<v8::Context> paused_context,
+ v8::Local<v8::Object> exec_state,
+ v8::Local<v8::Value> break_points_hit) override;
+ void ExceptionThrown(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;
+
v8::Isolate* m_isolate;
V8InspectorImpl* m_inspector;
int m_enableCount;

Powered by Google App Engine
This is Rietveld 408576698