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

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

Issue 891293003: Store zone in microtask entry. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix type assertion. Don't store zone if using zone.bind. Created 5 years, 8 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/schedule_microtask.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/async/zone.dart
diff --git a/sdk/lib/async/zone.dart b/sdk/lib/async/zone.dart
index de9af019e017a4c1a15d32e42531221e617cc0ef..0b5c21f4aa49b9f4801c154f0528732425fc42ff 100644
--- a/sdk/lib/async/zone.dart
+++ b/sdk/lib/async/zone.dart
@@ -943,8 +943,10 @@ void _rootScheduleMicrotask(Zone self, ZoneDelegate parent, Zone zone, f()) {
if (!identical(_ROOT_ZONE, zone)) {
bool hasErrorHandler = !_ROOT_ZONE.inSameErrorZone(zone);
f = zone.bindCallback(f, runGuarded: hasErrorHandler);
+ // Use root zone as event zone if the function is already bound.
+ zone = _ROOT_ZONE;
}
- _scheduleAsyncCallback(f);
+ _scheduleAsyncCallback(new _AsyncCallbackEntry(f, zone));
}
Timer _rootCreateTimer(Zone self, ZoneDelegate parent, Zone zone,
« no previous file with comments | « sdk/lib/async/schedule_microtask.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698