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

Unified Diff: third_party/WebKit/Source/core/inspector/v8/InjectedScriptManager.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/InjectedScriptManager.cpp
diff --git a/third_party/WebKit/Source/core/inspector/v8/InjectedScriptManager.cpp b/third_party/WebKit/Source/core/inspector/v8/InjectedScriptManager.cpp
index 4433ec55ea87545622ec595c32dad11e0010e377..c28a9960365d363aee39dc6bed420a5afd672ce7 100644
--- a/third_party/WebKit/Source/core/inspector/v8/InjectedScriptManager.cpp
+++ b/third_party/WebKit/Source/core/inspector/v8/InjectedScriptManager.cpp
@@ -30,6 +30,7 @@
#include "core/inspector/v8/InjectedScriptManager.h"
+#include "core/InjectedScriptSource.h"
#include "core/inspector/v8/InjectedScript.h"
#include "core/inspector/v8/InjectedScriptHost.h"
#include "core/inspector/v8/InjectedScriptNative.h"
@@ -135,9 +136,7 @@ InjectedScript* InjectedScriptManager::injectedScriptFor(v8::Local<v8::Context>
return nullptr;
RefPtr<InjectedScriptNative> injectedScriptNative = adoptRef(new InjectedScriptNative(context->GetIsolate()));
-
- const WebData& injectedScriptSourceResource = Platform::current()->loadResource("InjectedScriptSource.js");
- String injectedScriptSource(injectedScriptSourceResource.data(), injectedScriptSourceResource.size());
+ String injectedScriptSource(reinterpret_cast<const char*>(InjectedScriptSource_js), sizeof(InjectedScriptSource_js));
v8::Local<v8::Object> object = createInjectedScript(injectedScriptSource, context, contextId, injectedScriptNative.get());
OwnPtr<InjectedScript> result = adoptPtr(new InjectedScript(this, context, object, m_client, injectedScriptNative.release(), contextId));

Powered by Google App Engine
This is Rietveld 408576698