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

Side by Side Diff: sdk/lib/async/schedule_microtask.dart

Issue 2754013002: Format all dart: library files (Closed)
Patch Set: Format all dart: library files Created 3 years, 9 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 unified diff | Download patch
« no previous file with comments | « sdk/lib/async/future_impl.dart ('k') | sdk/lib/async/stream.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of dart.async; 5 part of dart.async;
6 6
7 typedef void _AsyncCallback(); 7 typedef void _AsyncCallback();
8 8
9 class _AsyncCallbackEntry { 9 class _AsyncCallbackEntry {
10 final _AsyncCallback callback; 10 final _AsyncCallback callback;
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 _Zone currentZone = Zone.current; 133 _Zone currentZone = Zone.current;
134 if (identical(_ROOT_ZONE, currentZone)) { 134 if (identical(_ROOT_ZONE, currentZone)) {
135 // No need to bind the callback. We know that the root's scheduleMicrotask 135 // No need to bind the callback. We know that the root's scheduleMicrotask
136 // will be invoked in the root zone. 136 // will be invoked in the root zone.
137 _rootScheduleMicrotask(null, null, _ROOT_ZONE, callback); 137 _rootScheduleMicrotask(null, null, _ROOT_ZONE, callback);
138 return; 138 return;
139 } 139 }
140 _ZoneFunction implementation = currentZone._scheduleMicrotask; 140 _ZoneFunction implementation = currentZone._scheduleMicrotask;
141 if (identical(_ROOT_ZONE, implementation.zone) && 141 if (identical(_ROOT_ZONE, implementation.zone) &&
142 _ROOT_ZONE.inSameErrorZone(currentZone)) { 142 _ROOT_ZONE.inSameErrorZone(currentZone)) {
143 _rootScheduleMicrotask(null, null, currentZone, 143 _rootScheduleMicrotask(
144 currentZone.registerCallback(callback)); 144 null, null, currentZone, currentZone.registerCallback(callback));
145 return; 145 return;
146 } 146 }
147 Zone.current.scheduleMicrotask( 147 Zone.current
148 Zone.current.bindCallback(callback, runGuarded: true)); 148 .scheduleMicrotask(Zone.current.bindCallback(callback, runGuarded: true));
149 } 149 }
150 150
151 class _AsyncRun { 151 class _AsyncRun {
152 /** Schedule the given callback before any other event in the event-loop. */ 152 /** Schedule the given callback before any other event in the event-loop. */
153 external static void _scheduleImmediate(void callback()); 153 external static void _scheduleImmediate(void callback());
154 } 154 }
OLDNEW
« no previous file with comments | « sdk/lib/async/future_impl.dart ('k') | sdk/lib/async/stream.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698