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

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

Issue 1676093002: Revert of 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 59b58c7f5c5f82471acd69dfaa68a5e4e49ea875..4433ec55ea87545622ec595c32dad11e0010e377 100644
--- a/third_party/WebKit/Source/core/inspector/v8/InjectedScriptManager.cpp
+++ b/third_party/WebKit/Source/core/inspector/v8/InjectedScriptManager.cpp
@@ -33,12 +33,13 @@
#include "core/inspector/v8/InjectedScript.h"
#include "core/inspector/v8/InjectedScriptHost.h"
#include "core/inspector/v8/InjectedScriptNative.h"
-#include "core/inspector/v8/InjectedScriptSource.h"
#include "core/inspector/v8/RemoteObjectId.h"
#include "core/inspector/v8/V8Debugger.h"
#include "core/inspector/v8/V8DebuggerClient.h"
#include "core/inspector/v8/V8InjectedScriptHost.h"
#include "core/inspector/v8/V8StringUtil.h"
+#include "public/platform/Platform.h"
+#include "public/platform/WebData.h"
#include "wtf/PassOwnPtr.h"
namespace blink {
@@ -134,7 +135,9 @@
return nullptr;
RefPtr<InjectedScriptNative> injectedScriptNative = adoptRef(new InjectedScriptNative(context->GetIsolate()));
- String injectedScriptSource(reinterpret_cast<const char*>(InjectedScriptSource_js), sizeof(InjectedScriptSource_js));
+
+ const WebData& injectedScriptSourceResource = Platform::current()->loadResource("InjectedScriptSource.js");
+ String injectedScriptSource(injectedScriptSourceResource.data(), injectedScriptSourceResource.size());
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));
« no previous file with comments | « third_party/WebKit/Source/core/inspector/v8/BUILD.gn ('k') | third_party/WebKit/Source/core/inspector/v8/V8DebuggerImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698