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

Unified Diff: sdk/lib/async/schedule_microtask.dart

Issue 79243002: Implement scheduleImmediate for the VM. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month 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
Index: sdk/lib/async/schedule_microtask.dart
diff --git a/sdk/lib/async/schedule_microtask.dart b/sdk/lib/async/schedule_microtask.dart
index 94a68c5e772081edff84d9171a542114a4d3507b..e95aa22ec6e13e0f3934f59ba7d5af4cbc44fe31 100644
--- a/sdk/lib/async/schedule_microtask.dart
+++ b/sdk/lib/async/schedule_microtask.dart
@@ -17,7 +17,7 @@ void _asyncRunCallback() {
try {
callback();
} catch (e) {
- _AsyncRun._scheduleImmediate(_asyncRunCallback);
+ scheduleImmediate(_asyncRunCallback);
rethrow;
}
}
@@ -30,7 +30,7 @@ void _scheduleAsyncCallback(callback) {
// same Timer callback.
_asyncCallbacks.add(callback);
if (!_callbacksAreEnqueued) {
- _AsyncRun._scheduleImmediate(_asyncRunCallback);
+ scheduleImmediate(_asyncRunCallback);
_callbacksAreEnqueued = true;
}
}
@@ -70,8 +70,3 @@ void scheduleMicrotask(void callback()) {
Zone.current.scheduleMicrotask(
Zone.current.bindCallback(callback, runGuarded: true));
}
-
-class _AsyncRun {
- /** Schedule the given callback before any other event in the event-loop. */
- external static void _scheduleImmediate(void callback());
-}

Powered by Google App Engine
This is Rietveld 408576698