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

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

Issue 1670813003: DevTools: do not use platform/ to load injected scripts into inspector/v8. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 f1e6281bf5c03e69dff204251e5e4c03bb89f0ad..727becf36485566f75154620d34671021f0a0022 100644
--- a/third_party/WebKit/Source/core/inspector/v8/V8DebuggerImpl.cpp
+++ b/third_party/WebKit/Source/core/inspector/v8/V8DebuggerImpl.cpp
@@ -30,6 +30,7 @@
#include "core/inspector/v8/V8DebuggerImpl.h"
+#include "core/DebuggerScript.h"
#include "core/inspector/v8/JavaScriptCallFrame.h"
#include "core/inspector/v8/ScriptBreakpoint.h"
#include "core/inspector/v8/V8DebuggerAgentImpl.h"
@@ -718,8 +719,8 @@ void V8DebuggerImpl::compileDebuggerScript()
v8::HandleScope scope(m_isolate);
v8::Context::Scope contextScope(debuggerContext());
- const WebData& source = Platform::current()->loadResource("DebuggerScriptSource.js");
- v8::Local<v8::String> scriptValue = v8::String::NewFromUtf8(m_isolate, source.data(), v8::NewStringType::kInternalized, source.size()).ToLocalChecked();
+
+ v8::Local<v8::String> scriptValue = v8::String::NewFromUtf8(m_isolate, reinterpret_cast<const char*>(DebuggerScript_js), v8::NewStringType::kInternalized, sizeof(DebuggerScript_js)).ToLocalChecked();
dgozman 2016/02/05 02:49:11 Let's avoid static_cast here.
v8::Local<v8::Value> value;
if (!m_client->compileAndRunInternalScript(scriptValue).ToLocal(&value))
return;
« no previous file with comments | « third_party/WebKit/Source/core/inspector/v8/InjectedScriptManager.cpp ('k') | third_party/WebKit/public/blink_resources.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698