| 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);
|
|
|