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

Unified Diff: third_party/WebKit/Source/core/inspector/v8/V8DebuggerImpl.cpp

Issue 1641933002: DevTools: remove V8ScriptRunner use from InjectedScript*. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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: third_party/WebKit/Source/core/inspector/v8/V8DebuggerImpl.cpp
diff --git a/third_party/WebKit/Source/core/inspector/v8/V8DebuggerImpl.cpp b/third_party/WebKit/Source/core/inspector/v8/V8DebuggerImpl.cpp
index d5ea6313cbbb6191b89a030e597724054a4326f3..1f43a2823bf433342cbdb9b2d04401088b088038 100644
--- a/third_party/WebKit/Source/core/inspector/v8/V8DebuggerImpl.cpp
+++ b/third_party/WebKit/Source/core/inspector/v8/V8DebuggerImpl.cpp
@@ -38,6 +38,8 @@
#include "core/inspector/v8/V8DebuggerClient.h"
#include "core/inspector/v8/V8JavaScriptCallFrame.h"
#include "platform/JSONValues.h"
+#include "public/platform/Platform.h"
+#include "public/platform/WebData.h"
#include "wtf/Atomics.h"
#include "wtf/Vector.h"
#include "wtf/text/CString.h"
@@ -710,10 +712,13 @@ void V8DebuggerImpl::compileDebuggerScript()
v8::HandleScope scope(m_isolate);
v8::Context::Scope contextScope(debuggerContext());
- v8::Local<v8::Object> value = m_client->compileDebuggerScript();
- if (value.IsEmpty())
+ const WebData& debuggerScriptSourceResource = Platform::current()->loadResource("DebuggerScriptSource.js");
+ String source(debuggerScriptSourceResource.data(), debuggerScriptSourceResource.size());
+ v8::Local<v8::Value> value;
+ if (!m_client->compileAndRunInternalScript(source).ToLocal(&value))
return;
- m_debuggerScript.Reset(m_isolate, value);
+ ASSERT(value->IsObject());
+ m_debuggerScript.Reset(m_isolate, value.As<v8::Object>());
}
v8::Local<v8::Context> V8DebuggerImpl::debuggerContext() const

Powered by Google App Engine
This is Rietveld 408576698