Index: dart/sdk/lib/_internal/lib/async_patch.dart |
diff --git a/dart/sdk/lib/_internal/lib/async_patch.dart b/dart/sdk/lib/_internal/lib/async_patch.dart |
index dede2552bcd8ef04daadcd494e7869eb89f362fa..cd5890d595fd9ac4e9e875a819b9928c3a2c685b 100644 |
--- a/dart/sdk/lib/_internal/lib/async_patch.dart |
+++ b/dart/sdk/lib/_internal/lib/async_patch.dart |
@@ -14,8 +14,7 @@ import 'dart:_isolate_helper' show |
TimerImpl, |
leaveJsAsync, |
enterJsAsync, |
- isWorker, |
- globalThis; |
+ isWorker; |
import 'dart:_foreign_helper' show JS; |
@@ -46,7 +45,7 @@ class _AsyncRun { |
_initializeScheduleImmediate(); |
static Function _initializeScheduleImmediate() { |
- if (JS('', '#.scheduleImmediate', globalThis) != null) { |
+ if (JS('', 'self.scheduleImmediate') != null) { |
return _scheduleImmediateJsOverride; |
} |
// TODO(9002): don't use the Timer to enqueue the immediate callback. |
@@ -60,8 +59,7 @@ class _AsyncRun { |
callback(); |
}; |
enterJsAsync(); |
- JS('void', '#.scheduleImmediate(#)', |
- globalThis, |
+ JS('void', 'self.scheduleImmediate(#)', |
convertDartClosureToJS(internalCallback, 0)); |
} |