| Index: Source/bindings/dart/DartController.cpp
|
| diff --git a/Source/bindings/dart/DartController.cpp b/Source/bindings/dart/DartController.cpp
|
| index 7890130f63e4ac3bdf5df39313e70033bb3914bc..0cf73c637960fdc10ce6fb0558051f7a42c124c3 100644
|
| --- a/Source/bindings/dart/DartController.cpp
|
| +++ b/Source/bindings/dart/DartController.cpp
|
| @@ -201,7 +201,24 @@ Dart_Isolate DartController::createIsolate(const char* scriptURL, const char* en
|
| (isDOMEnabled ? "_printClosure" : "_pureIsolatePrintClosure");
|
| copyValue(html, printClosure, "dart:_collection-dev", 0, "_printClosure");
|
| copyValue(html, isDOMEnabled ? "_timerFactoryClosure" : "_pureIsolateTimerFactoryClosure", "dart:async", "_TimerFactory", "_factory");
|
| - copyValue(html, isDOMEnabled ? "_scheduleImmediateClosure" : "_pureIsolateScheduleImmediateClosure", "dart:async", "_ScheduleImmediate", "_closure");
|
| + if (isDOMEnabled) {
|
| + copyValue(html, "_scheduleImmediateClosure", "dart:async", "_ScheduleImmediate", "_closure");
|
| + } else {
|
| + // Use the VM implementation (from dart:isolate) for scheduleImmediate.
|
| + Dart_Handle isolateLibrary = Dart_LookupLibrary(Dart_NewStringFromCString("dart:isolate"));
|
| + ASSERT(!Dart_IsError(isolateLibrary));
|
| +
|
| + Dart_Handle value = Dart_Invoke(isolateLibrary, Dart_NewStringFromCString("_getIsolateScheduleImmediateClosure"), 0, 0);
|
| + ASSERT(!Dart_IsError(value));
|
| +
|
| + Dart_Handle library = Dart_LookupLibrary(Dart_NewStringFromCString("dart:async"));
|
| + ASSERT(!Dart_IsError(library));
|
| +
|
| + Dart_Handle target = Dart_GetType(library, Dart_NewStringFromCString("_ScheduleImmediate"), 0, 0);
|
| + ASSERT(!Dart_IsError(target));
|
| +
|
| + Dart_SetField(target, Dart_NewStringFromCString("_closure"), value);
|
| + }
|
| copyValue(html, isDOMEnabled ? "_uriBaseClosure" : "_pureIsolateUriBaseClosure", "dart:core", 0, "_uriBaseClosure");
|
|
|
| if (isDOMEnabled) {
|
|
|