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

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

Issue 637893002: Use a _FutureListener separate from the _Future to hold listeners. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Don't check that source is complete, it always is. Created 6 years, 2 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
Index: sdk/lib/async/schedule_microtask.dart
diff --git a/sdk/lib/async/schedule_microtask.dart b/sdk/lib/async/schedule_microtask.dart
index 7e1c82d9b382cc0631cae41b07e45ae7b34c94ba..cc0931d40cc5e9ee02f5b9a93dc641bd851b9c1e 100644
--- a/sdk/lib/async/schedule_microtask.dart
+++ b/sdk/lib/async/schedule_microtask.dart
@@ -83,10 +83,8 @@ void _scheduleAsyncCallback(callback) {
void _schedulePriorityAsyncCallback(callback) {
_AsyncCallbackEntry entry = new _AsyncCallbackEntry(callback);
if (_nextCallback == null) {
- _nextCallback = _lastCallback = _lastPriorityCallback = entry;
- if (!_isInCallbackLoop) {
- _AsyncRun._scheduleImmediate(_asyncRunCallback);
- }
+ _scheduleAsyncCallback(callback);
+ _lastPriorityCallback = _lastCallback;
} else if (_lastPriorityCallback == null) {
entry.next = _nextCallback;
_nextCallback = _lastPriorityCallback = entry;

Powered by Google App Engine
This is Rietveld 408576698