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

Unified Diff: tool/input_sdk/lib/async/stream_impl.dart

Issue 1243503007: fixes #221, initial sync*, async, async* implementation (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 5 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 | « test/testing.dart ('k') | tool/input_sdk/private/isolate_helper.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tool/input_sdk/lib/async/stream_impl.dart
diff --git a/tool/input_sdk/lib/async/stream_impl.dart b/tool/input_sdk/lib/async/stream_impl.dart
index dbf3f1b6398a278d72cebf6aadefabc32d51675f..b613cfdc8c23093046fbb915903a453e6ea0fa21 100644
--- a/tool/input_sdk/lib/async/stream_impl.dart
+++ b/tool/input_sdk/lib/async/stream_impl.dart
@@ -1029,6 +1029,8 @@ class _StreamIteratorImpl<T> implements StreamIterator<T> {
Future cancel() {
StreamSubscription subscription = _subscription;
+ // Cherry pick of: https://codereview.chromium.org//896793002
+ if (subscription == null) return null;
if (_state == _STATE_MOVING) {
_Future<bool> hasNext = _futureOrPrefetch;
_clear();
« no previous file with comments | « test/testing.dart ('k') | tool/input_sdk/private/isolate_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698