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

Unified Diff: Source/bindings/core/dart/DartJsInterop.cpp

Issue 974273003: Revert "Revert "Support multiple DOM isolates and tweak devtools frontend to better handle large #s… (Closed) Base URL: svn://svn.chromium.org/blink/branches/dart/dartium
Patch Set: Created 5 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
« no previous file with comments | « Source/bindings/core/dart/DartController.cpp ('k') | Source/bindings/core/dart/DartScriptState.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/core/dart/DartJsInterop.cpp
diff --git a/Source/bindings/core/dart/DartJsInterop.cpp b/Source/bindings/core/dart/DartJsInterop.cpp
index 4b4e8f9900d55c8fc3cbf0ad5d1e42a4883949f1..4ac046c4c6680d2598e5e426486c68b22dc3f673 100644
--- a/Source/bindings/core/dart/DartJsInterop.cpp
+++ b/Source/bindings/core/dart/DartJsInterop.cpp
@@ -272,7 +272,12 @@ Dart_Handle JsInterop::toDart(v8::Local<v8::Value> v8Handle)
if (DartHandleProxy::isDartProxy(v8Handle)) {
DartPersistentValue* scriptValue = DartHandleProxy::readPointerFromProxy(v8Handle);
ASSERT(scriptValue->isIsolateAlive());
- return scriptValue->value();
+ // If the isolate does not match we fall back to using the existing JS
+ // wrapper for the Dart object so that simple cases that would work in
+ // Dart2Js work. We could alternately throw an exception here.
+ if (scriptValue->isolate() == Dart_CurrentIsolate()) {
+ return scriptValue->value();
+ }
}
return JsObject::toDart(object);
« no previous file with comments | « Source/bindings/core/dart/DartController.cpp ('k') | Source/bindings/core/dart/DartScriptState.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698