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

Unified Diff: sky/engine/v8_inspector/InjectedScriptManager.cpp

Issue 776743002: Make v8 inspector not crash (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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
« no previous file with comments | « sky/engine/v8_inspector/DebuggerScript.js ('k') | sky/engine/v8_inspector/ScriptDebugServer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/v8_inspector/InjectedScriptManager.cpp
diff --git a/sky/engine/v8_inspector/InjectedScriptManager.cpp b/sky/engine/v8_inspector/InjectedScriptManager.cpp
index 6820f06b5f45f5939f9f091d423a2352fe061f51..514a4b34bb7c24944ab2c44b3a1bc0f837d647be 100644
--- a/sky/engine/v8_inspector/InjectedScriptManager.cpp
+++ b/sky/engine/v8_inspector/InjectedScriptManager.cpp
@@ -34,10 +34,9 @@
#include "sky/engine/bindings/core/v8/ScriptValue.h"
#include "sky/engine/core/inspector/InjectedScriptHost.h"
#include "sky/engine/platform/JSONValues.h"
-#include "sky/engine/public/platform/Platform.h"
-#include "sky/engine/public/platform/WebData.h"
#include "sky/engine/v8_inspector/InjectedScript.h"
#include "sky/engine/v8_inspector/JSONParser.h"
+#include "sky/engine/v8_inspector/read_from_source_tree.h"
#include "sky/engine/wtf/PassOwnPtr.h"
namespace blink {
@@ -147,8 +146,9 @@ void InjectedScriptManager::releaseObjectGroup(const String& objectGroup)
String InjectedScriptManager::injectedScriptSource()
{
- const blink::WebData& injectedScriptSourceResource = blink::Platform::current()->loadResource("InjectedScriptSource.js");
- return String(injectedScriptSourceResource.data(), injectedScriptSourceResource.size());
+ std::string buffer;
+ inspector::ReadFileFromSourceTree("InjectedScriptSource.js", &buffer);
+ return String::fromUTF8(buffer);
}
InjectedScript InjectedScriptManager::injectedScriptFor(ScriptState* inspectedScriptState)
« no previous file with comments | « sky/engine/v8_inspector/DebuggerScript.js ('k') | sky/engine/v8_inspector/ScriptDebugServer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698