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

Unified Diff: sky/engine/v8_inspector/ScriptDebugServer.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/InjectedScriptManager.cpp ('k') | sky/engine/v8_inspector/read_from_source_tree.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/v8_inspector/ScriptDebugServer.cpp
diff --git a/sky/engine/v8_inspector/ScriptDebugServer.cpp b/sky/engine/v8_inspector/ScriptDebugServer.cpp
index 9a4ef31e4b0428b34802778cbc018940e4a5a3b2..6eb9176aae70d2c91835f7a9352089814c3cf997 100644
--- a/sky/engine/v8_inspector/ScriptDebugServer.cpp
+++ b/sky/engine/v8_inspector/ScriptDebugServer.cpp
@@ -41,13 +41,12 @@
#include "sky/engine/bindings/core/v8/V8ScriptRunner.h"
#include "sky/engine/core/inspector/JavaScriptCallFrame.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/read_from_source_tree.h"
#include "sky/engine/v8_inspector/ScriptDebugListener.h"
-#include "sky/engine/wtf/StdLibExtras.h"
-#include "sky/engine/wtf/Vector.h"
#include "sky/engine/wtf/dtoa/utils.h"
+#include "sky/engine/wtf/StdLibExtras.h"
#include "sky/engine/wtf/text/CString.h"
+#include "sky/engine/wtf/Vector.h"
namespace blink {
@@ -580,8 +579,10 @@ void ScriptDebugServer::ensureDebuggerScriptCompiled()
v8::HandleScope scope(m_isolate);
v8::Context::Scope contextScope(v8::Debug::GetDebugContext());
- const blink::WebData& debuggerScriptSourceResource = blink::Platform::current()->loadResource("DebuggerScript.js");
- v8::Handle<v8::String> source = v8String(m_isolate, String(debuggerScriptSourceResource.data(), debuggerScriptSourceResource.size()));
+
+ std::string buffer;
+ inspector::ReadFileFromSourceTree("DebuggerScript.js", &buffer);
+ v8::Handle<v8::String> source = v8String(m_isolate, String::fromUTF8(buffer));
v8::Local<v8::Value> value = V8ScriptRunner::compileAndRunInternalScript(source, m_isolate);
ASSERT(!value.IsEmpty());
ASSERT(value->IsObject());
« no previous file with comments | « sky/engine/v8_inspector/InjectedScriptManager.cpp ('k') | sky/engine/v8_inspector/read_from_source_tree.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698