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

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
« no previous file with comments | « lib/runtime/dart/_js_helper.js ('k') | lib/runtime/dart_library.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/runtime/dart/async.js
diff --git a/lib/runtime/dart/async.js b/lib/runtime/dart/async.js
index 2f574edf73e978abacdefcb2f6d607bcf77762d1..9f026c7ac2bf1a19be55690da00447e615407b02 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]();
« no previous file with comments | « lib/runtime/dart/_js_helper.js ('k') | lib/runtime/dart_library.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698