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

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

Issue 17064008: Revert "Zone support for Futures." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 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
« no previous file with comments | « sdk/lib/async/async_sources.gypi ('k') | sdk/lib/async/future_impl.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/async/event_loop.dart
diff --git a/sdk/lib/async/event_loop.dart b/sdk/lib/async/event_loop.dart
index bc0a63818b90aa0164a12d0039be8d377b2f270f..2802e40d55ec75e41a0426a65abe5babd6b642c1 100644
--- a/sdk/lib/async/event_loop.dart
+++ b/sdk/lib/async/event_loop.dart
@@ -18,23 +18,13 @@ void _asyncRunCallback() {
callback();
} catch (e) {
_AsyncRun._enqueueImmediate(_asyncRunCallback);
- rethrow;
+ throw;
}
}
// Any new callback must register a callback function now.
_callbacksAreEnqueued = false;
}
-void _scheduleAsyncCallback(callback) {
- // Optimizing a group of Timer.run callbacks to be executed in the
- // same Timer callback.
- _asyncCallbacks.add(callback);
- if (!_callbacksAreEnqueued) {
- _AsyncRun._enqueueImmediate(_asyncRunCallback);
- _callbacksAreEnqueued = true;
- }
-}
-
/**
* Runs the given [callback] asynchronously.
*
@@ -55,7 +45,13 @@ void _scheduleAsyncCallback(callback) {
* }
*/
void runAsync(void callback()) {
- _Zone._current.runAsync(callback);
+ // Optimizing a group of Timer.run callbacks to be executed in the
+ // same Timer callback.
+ _asyncCallbacks.add(callback);
+ if (!_callbacksAreEnqueued) {
+ _AsyncRun._enqueueImmediate(_asyncRunCallback);
+ _callbacksAreEnqueued = true;
+ }
}
class _AsyncRun {
« no previous file with comments | « sdk/lib/async/async_sources.gypi ('k') | sdk/lib/async/future_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698