Index: pkg/observe/lib/src/microtask.dart |
diff --git a/pkg/observe/lib/src/microtask.dart b/pkg/observe/lib/src/microtask.dart |
index 88b3d32252d31e80b964bfc990f7abdb0f6c4a5d..e4ed2d9bee2ece141ea523cd58adcf8c60657228 100644 |
--- a/pkg/observe/lib/src/microtask.dart |
+++ b/pkg/observe/lib/src/microtask.dart |
@@ -11,7 +11,7 @@ |
*/ |
library observe.src.microtask; |
-import 'dart:async' show Completer, runZonedExperimental; |
+import 'dart:async' show Completer, runZoned, ZoneSpecification; |
import 'dart:collection'; |
import 'package:observe/observe.dart' show Observable; |
@@ -61,10 +61,12 @@ wrapMicrotask(body()) => () => runMicrotask(body); |
* Runs the [body] in a zone that supports [performMicrotaskCheckpoint], |
* and returns the result. |
*/ |
-runMicrotask(body()) => runZonedExperimental(() { |
+runMicrotask(body()) => runZoned(() { |
try { |
return body(); |
} finally { |
performMicrotaskCheckpoint(); |
} |
-}, onRunAsync: (callback) => _pending.add(callback)); |
+}, zoneSpecification: new ZoneSpecification( |
+ scheduleMicrotask: (self, parent, zone, callback) => _pending.add(callback)) |
+); |