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

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: updated the chromevox script 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..3dbec54d1eaf9ada9ff7fe7acd950273fec4c629 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/inspector/v8/DebuggerScript.h"
#include "core/inspector/v8/JavaScriptCallFrame.h"
#include "core/inspector/v8/ScriptBreakpoint.h"
#include "core/inspector/v8/V8DebuggerAgentImpl.h"
@@ -38,8 +39,6 @@
#include "core/inspector/v8/V8StackTraceImpl.h"
#include "core/inspector/v8/V8StringUtil.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"
@@ -718,8 +717,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, DebuggerScript_js, v8::NewStringType::kInternalized, sizeof(DebuggerScript_js)).ToLocalChecked();
v8::Local<v8::Value> value;
if (!m_client->compileAndRunInternalScript(scriptValue).ToLocal(&value))
return;

Powered by Google App Engine
This is Rietveld 408576698