OLD | NEW |
1 dart_library.library('dart/async', null, /* Imports */[ | 1 dart_library.library('dart/async', null, /* Imports */[ |
2 "dart_runtime/dart", | 2 "dart_runtime/dart", |
3 'dart/core', | 3 'dart/core', |
4 'dart/_internal', | 4 'dart/_internal', |
5 'dart/collection' | 5 'dart/collection' |
6 ], /* Lazy imports */[ | 6 ], /* Lazy imports */[ |
7 'dart/_isolate_helper' | 7 'dart/_isolate_helper' |
8 ], function(exports, dart, core, _internal, collection, _isolate_helper) { | 8 ], function(exports, dart, core, _internal, collection, _isolate_helper) { |
9 'use strict'; | 9 'use strict'; |
10 let dartx = dart.dartx; | 10 let dartx = dart.dartx; |
(...skipping 4052 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4063 } | 4063 } |
4064 } | 4064 } |
4065 [_clear]() { | 4065 [_clear]() { |
4066 this[_subscription] = null; | 4066 this[_subscription] = null; |
4067 this[_futureOrPrefetch] = null; | 4067 this[_futureOrPrefetch] = null; |
4068 this[_current] = null; | 4068 this[_current] = null; |
4069 this[_state] = _StreamIteratorImpl$()._STATE_DONE; | 4069 this[_state] = _StreamIteratorImpl$()._STATE_DONE; |
4070 } | 4070 } |
4071 cancel() { | 4071 cancel() { |
4072 let subscription = this[_subscription]; | 4072 let subscription = this[_subscription]; |
| 4073 if (subscription == null) |
| 4074 return null; |
4073 if (this[_state] == _StreamIteratorImpl$()._STATE_MOVING) { | 4075 if (this[_state] == _StreamIteratorImpl$()._STATE_MOVING) { |
4074 let hasNext = dart.as(this[_futureOrPrefetch], _Future$(core.bool)); | 4076 let hasNext = dart.as(this[_futureOrPrefetch], _Future$(core.bool)); |
4075 this[_clear](); | 4077 this[_clear](); |
4076 hasNext[_complete](false); | 4078 hasNext[_complete](false); |
4077 } else { | 4079 } else { |
4078 this[_clear](); | 4080 this[_clear](); |
4079 } | 4081 } |
4080 return subscription.cancel(); | 4082 return subscription.cancel(); |
4081 } | 4083 } |
4082 [_onData](data) { | 4084 [_onData](data) { |
(...skipping 1828 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5911 exports.ScheduleMicrotaskHandler = ScheduleMicrotaskHandler; | 5913 exports.ScheduleMicrotaskHandler = ScheduleMicrotaskHandler; |
5912 exports.CreateTimerHandler = CreateTimerHandler; | 5914 exports.CreateTimerHandler = CreateTimerHandler; |
5913 exports.CreatePeriodicTimerHandler = CreatePeriodicTimerHandler; | 5915 exports.CreatePeriodicTimerHandler = CreatePeriodicTimerHandler; |
5914 exports.PrintHandler = PrintHandler; | 5916 exports.PrintHandler = PrintHandler; |
5915 exports.ForkHandler = ForkHandler; | 5917 exports.ForkHandler = ForkHandler; |
5916 exports.ZoneSpecification = ZoneSpecification; | 5918 exports.ZoneSpecification = ZoneSpecification; |
5917 exports.ZoneDelegate = ZoneDelegate; | 5919 exports.ZoneDelegate = ZoneDelegate; |
5918 exports.Zone = Zone; | 5920 exports.Zone = Zone; |
5919 exports.runZoned = runZoned; | 5921 exports.runZoned = runZoned; |
5920 }); | 5922 }); |
OLD | NEW |