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 |