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

Unified Diff: Source/core/inspector/ScriptDebuggerBase.cpp

Issue 1214863013: [DevTools] Remove ScriptDebugListener from V8Debugger. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 5 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
« no previous file with comments | « Source/core/inspector/ScriptDebuggerBase.h ('k') | Source/core/inspector/V8Debugger.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/ScriptDebuggerBase.cpp
diff --git a/Source/core/inspector/ScriptDebuggerBase.cpp b/Source/core/inspector/ScriptDebuggerBase.cpp
index 8a86c83407a096e85231becb89bfda99b23692f1..642a9735902135fd3bb509f109d8aa11b23d53a4 100644
--- a/Source/core/inspector/ScriptDebuggerBase.cpp
+++ b/Source/core/inspector/ScriptDebuggerBase.cpp
@@ -7,14 +7,15 @@
#include "bindings/core/v8/V8Binding.h"
#include "bindings/core/v8/V8ScriptRunner.h"
+#include "core/inspector/ScriptDebugListener.h"
#include "public/platform/Platform.h"
#include "public/platform/WebData.h"
namespace blink {
-ScriptDebuggerBase::ScriptDebuggerBase(v8::Isolate* isolate, PassOwnPtrWillBeRawPtr<V8Debugger> debugger)
+ScriptDebuggerBase::ScriptDebuggerBase(v8::Isolate* isolate)
: m_isolate(isolate)
- , m_debugger(debugger)
+ , m_debugger(V8Debugger::create(isolate, this))
{
}
@@ -39,4 +40,43 @@ v8::Local<v8::Object> ScriptDebuggerBase::compileDebuggerScript()
return value.As<v8::Object>();
}
+void ScriptDebuggerBase::didParseSource(v8::Local<v8::Context> context, const V8Debugger::ParsedScript& parsedScript)
+{
+ if (ScriptDebugListener* listener = getDebugListenerForContext(context))
+ listener->didParseSource(parsedScript);
+}
+
+V8Debugger::SkipPauseRequest ScriptDebuggerBase::didPause(ScriptState* scriptState, const ScriptValue& callFrames, const ScriptValue& exception, const Vector<String>& hitBreakpoints, bool isPromiseRejection)
+{
+ if (ScriptDebugListener* listener = getDebugListenerForContext(scriptState->context()))
+ return listener->didPause(scriptState, callFrames, exception, hitBreakpoints, isPromiseRejection);
+ return V8Debugger::Continue;
+}
+
+bool ScriptDebuggerBase::v8AsyncTaskEventsEnabled(ScriptState* scriptState)
+{
+ if (ScriptDebugListener* listener = getDebugListenerForContext(scriptState->context()))
+ return listener->v8AsyncTaskEventsEnabled();
+ return false;
+}
+
+void ScriptDebuggerBase::didReceiveV8AsyncTaskEvent(ScriptState* scriptState, const String& eventType, const String& eventName, int id)
+{
+ if (ScriptDebugListener* listener = getDebugListenerForContext(scriptState->context()))
+ listener->didReceiveV8AsyncTaskEvent(scriptState, eventType, eventName, id);
+}
+
+bool ScriptDebuggerBase::v8PromiseEventsEnabled(ScriptState* scriptState)
+{
+ if (ScriptDebugListener* listener = getDebugListenerForContext(scriptState->context()))
+ return listener->v8PromiseEventsEnabled();
+ return false;
+}
+
+void ScriptDebuggerBase::didReceiveV8PromiseEvent(ScriptState* scriptState, v8::Local<v8::Object> promise, v8::Local<v8::Value> parentPromise, int status)
+{
+ if (ScriptDebugListener* listener = getDebugListenerForContext(scriptState->context()))
+ listener->didReceiveV8PromiseEvent(scriptState, promise, parentPromise, status);
+}
+
}
« no previous file with comments | « Source/core/inspector/ScriptDebuggerBase.h ('k') | Source/core/inspector/V8Debugger.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698