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

Unified Diff: lib/runtime/dart/async.js

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
Index: lib/runtime/dart/async.js
diff --git a/lib/runtime/dart/async.js b/lib/runtime/dart/async.js
index 99506c10940f291f7af116a84b26f3d94c781155..3e3fc75938b0e5466540397db5011e9afe2d1b45 100644
--- a/lib/runtime/dart/async.js
+++ b/lib/runtime/dart/async.js
@@ -4070,6 +4070,8 @@ dart_library.library('dart/async', null, /* Imports */[
}
cancel() {
let subscription = this[_subscription];
+ if (subscription == null)
+ return null;
if (this[_state] == _StreamIteratorImpl$()._STATE_MOVING) {
let hasNext = dart.as(this[_futureOrPrefetch], _Future$(core.bool));
this[_clear]();

Powered by Google App Engine
This is Rietveld 408576698