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

Unified Diff: Source/bindings/v8/custom/V8InjectedScriptHostCustom.cpp

Issue 24989007: Model each Dart library as its own ScriptState when devtools are enabled. (Closed) Base URL: svn://svn.chromium.org/multivm/trunk/webkit
Patch Set: Created 7 years, 2 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
« no previous file with comments | « Source/bindings/v8/ScriptState.h ('k') | Source/bindings/v8/custom/V8InjectedScriptManager.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/custom/V8InjectedScriptHostCustom.cpp
diff --git a/Source/bindings/v8/custom/V8InjectedScriptHostCustom.cpp b/Source/bindings/v8/custom/V8InjectedScriptHostCustom.cpp
index 933985e8e317ab47e7c87590f2e61d7adcc7b083..60c91363c3acc0fa4e3d81cc159a12a03801bd1b 100644
--- a/Source/bindings/v8/custom/V8InjectedScriptHostCustom.cpp
+++ b/Source/bindings/v8/custom/V8InjectedScriptHostCustom.cpp
@@ -38,6 +38,7 @@
#include "V8NodeList.h"
#include "V8Storage.h"
#include "bindings/dart/DartHandleProxy.h"
+#include "bindings/dart/DartInjectedScriptHost.h"
#include "bindings/v8/BindingSecurity.h"
#include "bindings/v8/ScriptDebugServer.h"
#include "bindings/v8/ScriptValue.h"
@@ -354,6 +355,14 @@ void V8InjectedScriptHost::evaluateMethodCustom(const v8::FunctionCallbackInfo<v
return;
}
+ // FIXME(dartbug.com/13804): refactor DartInjectedScriptHost to instead
+ // subclass InjectedScriptHost.
+ v8::Handle<v8::Value> dartResult = DartInjectedScriptHost::evaluateIfDartContext(args.Holder(), expression);
+ if (!dartResult.IsEmpty()) {
+ v8SetReturnValue(args, dartResult);
+ return;
+ }
+
ASSERT(!v8::Context::GetCurrent().IsEmpty());
v8::TryCatch tryCatch;
v8::Handle<v8::Value> result = V8ScriptRunner::compileAndRunInternalScript(expression, args.GetIsolate());
« no previous file with comments | « Source/bindings/v8/ScriptState.h ('k') | Source/bindings/v8/custom/V8InjectedScriptManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698