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

Unified Diff: tools/dom/src/shared_html.dart

Issue 2609633002: Make EventStreamSubscription DDC safe. (Closed)
Patch Set: Rebase Created 3 years, 11 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 | « tools/dom/src/EventStreamProvider.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/dom/src/shared_html.dart
diff --git a/tools/dom/src/shared_html.dart b/tools/dom/src/shared_html.dart
index 7342cdfef31238ae884a8abcffebc73faef68749..b76b37b1cfe55b3f4ef3d2ff26c04f0cc4fa401f 100644
--- a/tools/dom/src/shared_html.dart
+++ b/tools/dom/src/shared_html.dart
@@ -12,23 +12,13 @@ _wrapZoneCallback/*<A, R>*/ _wrapZone/*<A, R>*/(_wrapZoneCallback/*<A, R>*/ call
// For performance reasons avoid wrapping if we are in the root zone.
if (Zone.current == Zone.ROOT) return callback;
if (callback == null) return null;
- // TODO(jacobr): we cast to _wrapZoneCallback/*<A, R>*/ to hack around missing
- // generic method support in zones.
- // ignore: STRONG_MODE_DOWN_CAST_COMPOSITE
- _wrapZoneCallback/*<A, R>*/ wrapped =
- Zone.current.bindUnaryCallback(callback, runGuarded: true);
- return wrapped;
+ return Zone.current.bindUnaryCallback/*<R, A>*/(callback, runGuarded: true);
}
_wrapZoneBinaryCallback/*<A, B, R>*/ _wrapBinaryZone/*<A, B, R>*/(_wrapZoneBinaryCallback/*<A, B, R>*/ callback) {
if (Zone.current == Zone.ROOT) return callback;
if (callback == null) return null;
- // We cast to _wrapZoneBinaryCallback/*<A, B, R>*/ to hack around missing
- // generic method support in zones.
- // ignore: STRONG_MODE_DOWN_CAST_COMPOSITE
- _wrapZoneBinaryCallback/*<A, B, R>*/ wrapped =
- Zone.current.bindBinaryCallback(callback, runGuarded: true);
- return wrapped;
+ return Zone.current.bindBinaryCallback/*<R, A, B>*/(callback, runGuarded: true);
}
/**
« no previous file with comments | « tools/dom/src/EventStreamProvider.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698