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

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: 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/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..59b58c7f5c5f82471acd69dfaa68a5e4e49ea875 100644
--- a/third_party/WebKit/Source/core/inspector/v8/InjectedScriptManager.cpp
+++ b/third_party/WebKit/Source/core/inspector/v8/InjectedScriptManager.cpp
@@ -33,13 +33,12 @@
#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 {
@@ -135,9 +134,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));
« 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