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

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

Issue 216273003: Adjust debugging statements for ie11. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | tests/html/html.status » ('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 13 matching lines...) Expand all
24 entry = _nextCallback = entry.next; 24 entry = _nextCallback = entry.next;
25 } 25 }
26 // Any new callback must register a callback function now. 26 // Any new callback must register a callback function now.
27 _lastCallback = null; 27 _lastCallback = null;
28 } 28 }
29 29
30 void _asyncRunCallback() { 30 void _asyncRunCallback() {
31 try { 31 try {
32 _asyncRunCallbackLoop(); 32 _asyncRunCallbackLoop();
33 } catch (e) { 33 } catch (e) {
34 print('microtask error $e'); // TODO(efortuna): Remove this.
34 _AsyncRun._scheduleImmediate(_asyncRunCallback); 35 _AsyncRun._scheduleImmediate(_asyncRunCallback);
35 _nextCallback = _nextCallback.next; 36 _nextCallback = _nextCallback.next;
36 rethrow; 37 rethrow;
37 } 38 }
38 } 39 }
39 40
40 void _scheduleAsyncCallback(callback) { 41 void _scheduleAsyncCallback(callback) {
41 // Optimizing a group of Timer.run callbacks to be executed in the 42 // Optimizing a group of Timer.run callbacks to be executed in the
42 // same Timer callback. 43 // same Timer callback.
43 if (_lastCallback == null) { 44 if (_lastCallback == null) {
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 return; 82 return;
82 } 83 }
83 Zone.current.scheduleMicrotask( 84 Zone.current.scheduleMicrotask(
84 Zone.current.bindCallback(callback, runGuarded: true)); 85 Zone.current.bindCallback(callback, runGuarded: true));
85 } 86 }
86 87
87 class _AsyncRun { 88 class _AsyncRun {
88 /** Schedule the given callback before any other event in the event-loop. */ 89 /** Schedule the given callback before any other event in the event-loop. */
89 external static void _scheduleImmediate(void callback()); 90 external static void _scheduleImmediate(void callback());
90 } 91 }
OLDNEW
« no previous file with comments | « no previous file | tests/html/html.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698