| OLD | NEW |
| 1 var async; | 1 var async; |
| 2 (function(exports) { | 2 (function(exports) { |
| 3 'use strict'; | 3 'use strict'; |
| 4 // Function _invokeErrorHandler: (Function, Object, StackTrace) → dynamic | 4 // Function _invokeErrorHandler: (Function, Object, StackTrace) → dynamic |
| 5 function _invokeErrorHandler(errorHandler, error, stackTrace) { | 5 function _invokeErrorHandler(errorHandler, error, stackTrace) { |
| 6 if (dart.is(errorHandler, ZoneBinaryCallback)) { | 6 if (dart.is(errorHandler, ZoneBinaryCallback)) { |
| 7 return dart.dinvokef(errorHandler, error, stackTrace); | 7 return dart.dinvokef(errorHandler, error, stackTrace); |
| 8 } else { | 8 } else { |
| 9 return dart.dinvokef(errorHandler, error); | 9 return dart.dinvokef(errorHandler, error); |
| 10 } | 10 } |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 } | 25 } |
| 26 toString() { | 26 toString() { |
| 27 return dart.as(dart.dinvoke(this.error, 'toString'), core.String); | 27 return dart.as(dart.dinvoke(this.error, 'toString'), core.String); |
| 28 } | 28 } |
| 29 } | 29 } |
| 30 class _UncaughtAsyncError extends AsyncError { | 30 class _UncaughtAsyncError extends AsyncError { |
| 31 _UncaughtAsyncError(error, stackTrace) { | 31 _UncaughtAsyncError(error, stackTrace) { |
| 32 super.AsyncError(error, _UncaughtAsyncError[_getBestStackTrace](error, sta
ckTrace)); | 32 super.AsyncError(error, _UncaughtAsyncError[_getBestStackTrace](error, sta
ckTrace)); |
| 33 } | 33 } |
| 34 static [_getBestStackTrace](error, stackTrace) { | 34 static [_getBestStackTrace](error, stackTrace) { |
| 35 if (stackTrace !== null) | 35 if (stackTrace != null) |
| 36 return stackTrace; | 36 return stackTrace; |
| 37 if (dart.is(error, core.Error)) { | 37 if (dart.is(error, core.Error)) { |
| 38 return dart.as(dart.dload(error, 'stackTrace'), core.StackTrace); | 38 return dart.as(dart.dload(error, 'stackTrace'), core.StackTrace); |
| 39 } | 39 } |
| 40 return null; | 40 return null; |
| 41 } | 41 } |
| 42 toString() { | 42 toString() { |
| 43 let result = `Uncaught Error: ${this.error}`; | 43 let result = `Uncaught Error: ${this.error}`; |
| 44 if (this.stackTrace !== null) { | 44 if (this.stackTrace != null) { |
| 45 result = `\nStack Trace:\n${this.stackTrace}`; | 45 result = `\nStack Trace:\n${this.stackTrace}`; |
| 46 } | 46 } |
| 47 return result; | 47 return result; |
| 48 } | 48 } |
| 49 } | 49 } |
| 50 let _controller = Symbol('_controller'); | 50 let _controller = Symbol('_controller'); |
| 51 let _createSubscription = Symbol('_createSubscription'); | 51 let _createSubscription = Symbol('_createSubscription'); |
| 52 let _onListen = Symbol('_onListen'); | 52 let _onListen = Symbol('_onListen'); |
| 53 let _addError = Symbol('_addError'); | 53 let _addError = Symbol('_addError'); |
| 54 let _completeError = Symbol('_completeError'); | 54 let _completeError = Symbol('_completeError'); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 68 controller._closeUnchecked(); | 68 controller._closeUnchecked(); |
| 69 }).bind(this)}); | 69 }).bind(this)}); |
| 70 return controller.stream; | 70 return controller.stream; |
| 71 } | 71 } |
| 72 fromIterable(data) { | 72 fromIterable(data) { |
| 73 return new _GeneratedStreamImpl(() => new _IterablePendingEvents(data)); | 73 return new _GeneratedStreamImpl(() => new _IterablePendingEvents(data)); |
| 74 } | 74 } |
| 75 periodic(period, computation) { | 75 periodic(period, computation) { |
| 76 if (computation === void 0) | 76 if (computation === void 0) |
| 77 computation = null; | 77 computation = null; |
| 78 if (computation === null) | 78 if (computation == null) |
| 79 computation = dart.closureWrap((i) => null, "(int) → T"); | 79 computation = dart.closureWrap((i) => null, "(int) → T"); |
| 80 let timer = null; | 80 let timer = null; |
| 81 let computationCount = 0; | 81 let computationCount = 0; |
| 82 let controller = null; | 82 let controller = null; |
| 83 let watch = new core.Stopwatch(); | 83 let watch = new core.Stopwatch(); |
| 84 // Function sendEvent: () → void | 84 // Function sendEvent: () → void |
| 85 function sendEvent() { | 85 function sendEvent() { |
| 86 watch.reset(); | 86 watch.reset(); |
| 87 let data = computation(((x) => computationCount = dart.notNull(x) + 1,
x)(computationCount)); | 87 let data = computation(((x) => computationCount = dart.notNull(x) + 1,
x)(computationCount)); |
| 88 controller.add(data); | 88 controller.add(data); |
| 89 } | 89 } |
| 90 // Function startPeriodicTimer: () → void | 90 // Function startPeriodicTimer: () → void |
| 91 function startPeriodicTimer() { | 91 function startPeriodicTimer() { |
| 92 dart.assert(timer === null); | 92 dart.assert(timer == null); |
| 93 timer = new Timer.periodic(period, (timer) => { | 93 timer = new Timer.periodic(period, (timer) => { |
| 94 sendEvent(); | 94 sendEvent(); |
| 95 }); | 95 }); |
| 96 } | 96 } |
| 97 controller = new StreamController({sync: true, onListen: (() => { | 97 controller = new StreamController({sync: true, onListen: (() => { |
| 98 watch.start(); | 98 watch.start(); |
| 99 startPeriodicTimer(); | 99 startPeriodicTimer(); |
| 100 }).bind(this), onPause: (() => { | 100 }).bind(this), onPause: (() => { |
| 101 timer.cancel(); | 101 timer.cancel(); |
| 102 timer = null; | 102 timer = null; |
| 103 watch.stop(); | 103 watch.stop(); |
| 104 }).bind(this), onResume: (() => { | 104 }).bind(this), onResume: (() => { |
| 105 dart.assert(timer === null); | 105 dart.assert(timer == null); |
| 106 let elapsed = watch.elapsed; | 106 let elapsed = watch.elapsed; |
| 107 watch.start(); | 107 watch.start(); |
| 108 timer = new Timer(period['-'](elapsed), () => { | 108 timer = new Timer(period['-'](elapsed), () => { |
| 109 timer = null; | 109 timer = null; |
| 110 startPeriodicTimer(); | 110 startPeriodicTimer(); |
| 111 sendEvent(); | 111 sendEvent(); |
| 112 }); | 112 }); |
| 113 }).bind(this), onCancel: (() => { | 113 }).bind(this), onCancel: (() => { |
| 114 if (timer !== null) | 114 if (timer != null) |
| 115 timer.cancel(); | 115 timer.cancel(); |
| 116 timer = null; | 116 timer = null; |
| 117 }).bind(this)}); | 117 }).bind(this)}); |
| 118 return controller.stream; | 118 return controller.stream; |
| 119 } | 119 } |
| 120 eventTransformed(source, mapSink) { | 120 eventTransformed(source, mapSink) { |
| 121 return dart.as(new _BoundSinkStream(source, dart.closureWrap(mapSink, "(
EventSink<dynamic>) → EventSink")), Stream$(T)); | 121 return dart.as(new _BoundSinkStream(source, dart.closureWrap(mapSink, "(
EventSink<dynamic>) → EventSink")), Stream$(T)); |
| 122 } | 122 } |
| 123 get isBroadcast() { | 123 get isBroadcast() { |
| 124 return false; | 124 return false; |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 subscription = this.listen(((event) => { | 186 subscription = this.listen(((event) => { |
| 187 let newStream = null; | 187 let newStream = null; |
| 188 try { | 188 try { |
| 189 newStream = convert(event); | 189 newStream = convert(event); |
| 190 } catch (e) { | 190 } catch (e) { |
| 191 let s = dart.stackTrace(e); | 191 let s = dart.stackTrace(e); |
| 192 controller.addError(e, s); | 192 controller.addError(e, s); |
| 193 return; | 193 return; |
| 194 } | 194 } |
| 195 | 195 |
| 196 if (newStream !== null) { | 196 if (newStream != null) { |
| 197 subscription.pause(); | 197 subscription.pause(); |
| 198 controller.addStream(newStream).whenComplete(subscription.resume); | 198 controller.addStream(newStream).whenComplete(subscription.resume); |
| 199 } | 199 } |
| 200 }).bind(this), {onError: dart.as(eventSink[_addError], core.Function),
onDone: controller.close}); | 200 }).bind(this), {onError: dart.as(eventSink[_addError], core.Function),
onDone: controller.close}); |
| 201 } | 201 } |
| 202 if (this.isBroadcast) { | 202 if (this.isBroadcast) { |
| 203 controller = new StreamController.broadcast({onListen: onListen, onCan
cel: (() => { | 203 controller = new StreamController.broadcast({onListen: onListen, onCan
cel: (() => { |
| 204 subscription.cancel(); | 204 subscription.cancel(); |
| 205 }).bind(this), sync: true}); | 205 }).bind(this), sync: true}); |
| 206 } else { | 206 } else { |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 492 let defaultValue = opts && 'defaultValue' in opts ? opts.defaultValue :
null; | 492 let defaultValue = opts && 'defaultValue' in opts ? opts.defaultValue :
null; |
| 493 let future = new _Future(); | 493 let future = new _Future(); |
| 494 let subscription = null; | 494 let subscription = null; |
| 495 subscription = this.listen((value) => { | 495 subscription = this.listen((value) => { |
| 496 _runUserCode(() => test(value), (isMatch) => { | 496 _runUserCode(() => test(value), (isMatch) => { |
| 497 if (isMatch) { | 497 if (isMatch) { |
| 498 _cancelAndValue(subscription, future, value); | 498 _cancelAndValue(subscription, future, value); |
| 499 } | 499 } |
| 500 }, dart.as(_cancelAndErrorClosure(subscription, future), dart.throw_("
Unimplemented type (dynamic, StackTrace) → dynamic"))); | 500 }, dart.as(_cancelAndErrorClosure(subscription, future), dart.throw_("
Unimplemented type (dynamic, StackTrace) → dynamic"))); |
| 501 }, {onError: future[_completeError], onDone: (() => { | 501 }, {onError: future[_completeError], onDone: (() => { |
| 502 if (defaultValue !== null) { | 502 if (defaultValue != null) { |
| 503 _runUserCode(defaultValue, future[_complete], future[_completeErro
r]); | 503 _runUserCode(defaultValue, future[_complete], future[_completeErro
r]); |
| 504 return; | 504 return; |
| 505 } | 505 } |
| 506 try { | 506 try { |
| 507 throw _internal.IterableElementError.noElement(); | 507 throw _internal.IterableElementError.noElement(); |
| 508 } catch (e) { | 508 } catch (e) { |
| 509 let s = dart.stackTrace(e); | 509 let s = dart.stackTrace(e); |
| 510 _completeWithErrorCallback(future, e, s); | 510 _completeWithErrorCallback(future, e, s); |
| 511 } | 511 } |
| 512 | 512 |
| 513 }).bind(this), cancelOnError: true}); | 513 }).bind(this), cancelOnError: true}); |
| 514 return future; | 514 return future; |
| 515 } | 515 } |
| 516 lastWhere(test, opts) { | 516 lastWhere(test, opts) { |
| 517 let defaultValue = opts && 'defaultValue' in opts ? opts.defaultValue :
null; | 517 let defaultValue = opts && 'defaultValue' in opts ? opts.defaultValue :
null; |
| 518 let future = new _Future(); | 518 let future = new _Future(); |
| 519 let result = null; | 519 let result = null; |
| 520 let foundResult = false; | 520 let foundResult = false; |
| 521 let subscription = null; | 521 let subscription = null; |
| 522 subscription = this.listen((value) => { | 522 subscription = this.listen((value) => { |
| 523 _runUserCode(() => true === test(value), (isMatch) => { | 523 _runUserCode(() => true == test(value), (isMatch) => { |
| 524 if (isMatch) { | 524 if (isMatch) { |
| 525 foundResult = true; | 525 foundResult = true; |
| 526 result = value; | 526 result = value; |
| 527 } | 527 } |
| 528 }, dart.as(_cancelAndErrorClosure(subscription, future), dart.throw_("
Unimplemented type (dynamic, StackTrace) → dynamic"))); | 528 }, dart.as(_cancelAndErrorClosure(subscription, future), dart.throw_("
Unimplemented type (dynamic, StackTrace) → dynamic"))); |
| 529 }, {onError: future[_completeError], onDone: (() => { | 529 }, {onError: future[_completeError], onDone: (() => { |
| 530 if (foundResult) { | 530 if (foundResult) { |
| 531 future._complete(result); | 531 future._complete(result); |
| 532 return; | 532 return; |
| 533 } | 533 } |
| 534 if (defaultValue !== null) { | 534 if (defaultValue != null) { |
| 535 _runUserCode(defaultValue, future[_complete], future[_completeErro
r]); | 535 _runUserCode(defaultValue, future[_complete], future[_completeErro
r]); |
| 536 return; | 536 return; |
| 537 } | 537 } |
| 538 try { | 538 try { |
| 539 throw _internal.IterableElementError.noElement(); | 539 throw _internal.IterableElementError.noElement(); |
| 540 } catch (e) { | 540 } catch (e) { |
| 541 let s = dart.stackTrace(e); | 541 let s = dart.stackTrace(e); |
| 542 _completeWithErrorCallback(future, e, s); | 542 _completeWithErrorCallback(future, e, s); |
| 543 } | 543 } |
| 544 | 544 |
| 545 }).bind(this), cancelOnError: true}); | 545 }).bind(this), cancelOnError: true}); |
| 546 return future; | 546 return future; |
| 547 } | 547 } |
| 548 singleWhere(test) { | 548 singleWhere(test) { |
| 549 let future = new _Future(); | 549 let future = new _Future(); |
| 550 let result = null; | 550 let result = null; |
| 551 let foundResult = false; | 551 let foundResult = false; |
| 552 let subscription = null; | 552 let subscription = null; |
| 553 subscription = this.listen((value) => { | 553 subscription = this.listen((value) => { |
| 554 _runUserCode(() => true === test(value), (isMatch) => { | 554 _runUserCode(() => true == test(value), (isMatch) => { |
| 555 if (isMatch) { | 555 if (isMatch) { |
| 556 if (foundResult) { | 556 if (foundResult) { |
| 557 try { | 557 try { |
| 558 throw _internal.IterableElementError.tooMany(); | 558 throw _internal.IterableElementError.tooMany(); |
| 559 } catch (e) { | 559 } catch (e) { |
| 560 let s = dart.stackTrace(e); | 560 let s = dart.stackTrace(e); |
| 561 _cancelAndErrorWithReplacement(subscription, future, e, s); | 561 _cancelAndErrorWithReplacement(subscription, future, e, s); |
| 562 } | 562 } |
| 563 | 563 |
| 564 return; | 564 return; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 582 }).bind(this), cancelOnError: true}); | 582 }).bind(this), cancelOnError: true}); |
| 583 return future; | 583 return future; |
| 584 } | 584 } |
| 585 elementAt(index) { | 585 elementAt(index) { |
| 586 if (dart.notNull(!(typeof index == 'number')) || dart.notNull(index) < 0
) | 586 if (dart.notNull(!(typeof index == 'number')) || dart.notNull(index) < 0
) |
| 587 throw new core.ArgumentError(index); | 587 throw new core.ArgumentError(index); |
| 588 let future = new _Future(); | 588 let future = new _Future(); |
| 589 let subscription = null; | 589 let subscription = null; |
| 590 let elementIndex = 0; | 590 let elementIndex = 0; |
| 591 subscription = this.listen((value) => { | 591 subscription = this.listen((value) => { |
| 592 if (index === elementIndex) { | 592 if (index == elementIndex) { |
| 593 _cancelAndValue(subscription, future, value); | 593 _cancelAndValue(subscription, future, value); |
| 594 return; | 594 return; |
| 595 } | 595 } |
| 596 elementIndex = 1; | 596 elementIndex = 1; |
| 597 }, {onError: future[_completeError], onDone: (() => { | 597 }, {onError: future[_completeError], onDone: (() => { |
| 598 future._completeError(new core.RangeError.index(index, this, "index"
, null, elementIndex)); | 598 future._completeError(new core.RangeError.index(index, this, "index"
, null, elementIndex)); |
| 599 }).bind(this), cancelOnError: true}); | 599 }).bind(this), cancelOnError: true}); |
| 600 return future; | 600 return future; |
| 601 } | 601 } |
| 602 timeout(timeLimit, opts) { | 602 timeout(timeLimit, opts) { |
| (...skipping 18 matching lines...) Expand all Loading... |
| 621 timer = zone.createTimer(timeLimit, dart.as(timeout, dart.throw_("Unim
plemented type () → void"))); | 621 timer = zone.createTimer(timeLimit, dart.as(timeout, dart.throw_("Unim
plemented type () → void"))); |
| 622 } | 622 } |
| 623 // Function onDone: () → void | 623 // Function onDone: () → void |
| 624 function onDone() { | 624 function onDone() { |
| 625 timer.cancel(); | 625 timer.cancel(); |
| 626 controller.close(); | 626 controller.close(); |
| 627 } | 627 } |
| 628 // Function onListen: () → void | 628 // Function onListen: () → void |
| 629 function onListen() { | 629 function onListen() { |
| 630 zone = Zone.current; | 630 zone = Zone.current; |
| 631 if (onTimeout === null) { | 631 if (onTimeout == null) { |
| 632 timeout = (() => { | 632 timeout = (() => { |
| 633 controller.addError(new TimeoutException("No stream event", timeLi
mit), null); | 633 controller.addError(new TimeoutException("No stream event", timeLi
mit), null); |
| 634 }).bind(this); | 634 }).bind(this); |
| 635 } else { | 635 } else { |
| 636 onTimeout = dart.closureWrap(zone.registerUnaryCallback(onTimeout),
"(EventSink<dynamic>) → void"); | 636 onTimeout = dart.closureWrap(zone.registerUnaryCallback(onTimeout),
"(EventSink<dynamic>) → void"); |
| 637 let wrapper = new _ControllerEventSinkWrapper(null); | 637 let wrapper = new _ControllerEventSinkWrapper(null); |
| 638 timeout = (() => { | 638 timeout = (() => { |
| 639 wrapper[_sink] = controller; | 639 wrapper[_sink] = controller; |
| 640 zone.runUnaryGuarded(onTimeout, wrapper); | 640 zone.runUnaryGuarded(onTimeout, wrapper); |
| 641 wrapper[_sink] = null; | 641 wrapper[_sink] = null; |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 789 this[_onData] = null; | 789 this[_onData] = null; |
| 790 this[_onError] = null; | 790 this[_onError] = null; |
| 791 this[_onDone] = null; | 791 this[_onDone] = null; |
| 792 this[_cancelFuture] = null; | 792 this[_cancelFuture] = null; |
| 793 this[_pending] = null; | 793 this[_pending] = null; |
| 794 this.onData(onData); | 794 this.onData(onData); |
| 795 this.onError(onError); | 795 this.onError(onError); |
| 796 this.onDone(onDone); | 796 this.onDone(onDone); |
| 797 } | 797 } |
| 798 [_setPendingEvents](pendingEvents) { | 798 [_setPendingEvents](pendingEvents) { |
| 799 dart.assert(this[_pending] === null); | 799 dart.assert(this[_pending] == null); |
| 800 if (pendingEvents === null) | 800 if (pendingEvents == null) |
| 801 return; | 801 return; |
| 802 this[_pending] = pendingEvents; | 802 this[_pending] = pendingEvents; |
| 803 if (!dart.notNull(pendingEvents.isEmpty)) { | 803 if (!dart.notNull(pendingEvents.isEmpty)) { |
| 804 this[_state] = _BufferingStreamSubscription[_STATE_HAS_PENDING]; | 804 this[_state] = _BufferingStreamSubscription[_STATE_HAS_PENDING]; |
| 805 this[_pending].schedule(this); | 805 this[_pending].schedule(this); |
| 806 } | 806 } |
| 807 } | 807 } |
| 808 [_extractPending]() { | 808 [_extractPending]() { |
| 809 dart.assert(this[_isCanceled]); | 809 dart.assert(this[_isCanceled]); |
| 810 let events = this[_pending]; | 810 let events = this[_pending]; |
| 811 this[_pending] = null; | 811 this[_pending] = null; |
| 812 return events; | 812 return events; |
| 813 } | 813 } |
| 814 onData(handleData) { | 814 onData(handleData) { |
| 815 if (handleData === null) | 815 if (handleData == null) |
| 816 handleData = dart.closureWrap(_nullDataHandler, "(T) → void"); | 816 handleData = dart.closureWrap(_nullDataHandler, "(T) → void"); |
| 817 this[_onData] = dart.closureWrap(this[_zone].registerUnaryCallback(handl
eData), "(T) → void"); | 817 this[_onData] = dart.closureWrap(this[_zone].registerUnaryCallback(handl
eData), "(T) → void"); |
| 818 } | 818 } |
| 819 onError(handleError) { | 819 onError(handleError) { |
| 820 if (handleError === null) | 820 if (handleError == null) |
| 821 handleError = _nullErrorHandler; | 821 handleError = _nullErrorHandler; |
| 822 this[_onError] = _registerErrorHandler(handleError, this[_zone]); | 822 this[_onError] = _registerErrorHandler(handleError, this[_zone]); |
| 823 } | 823 } |
| 824 onDone(handleDone) { | 824 onDone(handleDone) { |
| 825 if (handleDone === null) | 825 if (handleDone == null) |
| 826 handleDone = _nullDoneHandler; | 826 handleDone = _nullDoneHandler; |
| 827 this[_onDone] = this[_zone].registerCallback(handleDone); | 827 this[_onDone] = this[_zone].registerCallback(handleDone); |
| 828 } | 828 } |
| 829 pause(resumeSignal) { | 829 pause(resumeSignal) { |
| 830 if (resumeSignal === void 0) | 830 if (resumeSignal === void 0) |
| 831 resumeSignal = null; | 831 resumeSignal = null; |
| 832 if (this[_isCanceled]) | 832 if (this[_isCanceled]) |
| 833 return; | 833 return; |
| 834 let wasPaused = this[_isPaused]; | 834 let wasPaused = this[_isPaused]; |
| 835 let wasInputPaused = this[_isInputPaused]; | 835 let wasInputPaused = this[_isInputPaused]; |
| 836 this[_state] = dart.notNull(this[_state]) + dart.notNull(_BufferingStrea
mSubscription[_STATE_PAUSE_COUNT]) | dart.notNull(_BufferingStreamSubscription[_
STATE_INPUT_PAUSED]); | 836 this[_state] = dart.notNull(this[_state]) + dart.notNull(_BufferingStrea
mSubscription[_STATE_PAUSE_COUNT]) | dart.notNull(_BufferingStreamSubscription[_
STATE_INPUT_PAUSED]); |
| 837 if (resumeSignal !== null) | 837 if (resumeSignal != null) |
| 838 resumeSignal.whenComplete(this.resume); | 838 resumeSignal.whenComplete(this.resume); |
| 839 if (!dart.notNull(wasPaused) && dart.notNull(this[_pending] !== null)) | 839 if (!dart.notNull(wasPaused) && dart.notNull(this[_pending] != null)) |
| 840 this[_pending].cancelSchedule(); | 840 this[_pending].cancelSchedule(); |
| 841 if (!dart.notNull(wasInputPaused) && !dart.notNull(this[_inCallback])) | 841 if (!dart.notNull(wasInputPaused) && !dart.notNull(this[_inCallback])) |
| 842 this[_guardCallback](this[_onPause]); | 842 this[_guardCallback](this[_onPause]); |
| 843 } | 843 } |
| 844 resume() { | 844 resume() { |
| 845 if (this[_isCanceled]) | 845 if (this[_isCanceled]) |
| 846 return; | 846 return; |
| 847 if (this[_isPaused]) { | 847 if (this[_isPaused]) { |
| 848 this[_decrementPauseCount](); | 848 this[_decrementPauseCount](); |
| 849 if (!dart.notNull(this[_isPaused])) { | 849 if (!dart.notNull(this[_isPaused])) { |
| (...skipping 22 matching lines...) Expand all Loading... |
| 872 this[_onDone] = (() => { | 872 this[_onDone] = (() => { |
| 873 result._complete(futureValue); | 873 result._complete(futureValue); |
| 874 }).bind(this); | 874 }).bind(this); |
| 875 this[_onError] = ((error, stackTrace) => { | 875 this[_onError] = ((error, stackTrace) => { |
| 876 this.cancel(); | 876 this.cancel(); |
| 877 result._completeError(error, dart.as(stackTrace, core.StackTrace)); | 877 result._completeError(error, dart.as(stackTrace, core.StackTrace)); |
| 878 }).bind(this); | 878 }).bind(this); |
| 879 return result; | 879 return result; |
| 880 } | 880 } |
| 881 get [_isInputPaused]() { | 881 get [_isInputPaused]() { |
| 882 return (dart.notNull(this[_state]) & dart.notNull(_BufferingStreamSubscr
iption[_STATE_INPUT_PAUSED])) !== 0; | 882 return (dart.notNull(this[_state]) & dart.notNull(_BufferingStreamSubscr
iption[_STATE_INPUT_PAUSED])) != 0; |
| 883 } | 883 } |
| 884 get [_isClosed]() { | 884 get [_isClosed]() { |
| 885 return (dart.notNull(this[_state]) & dart.notNull(_BufferingStreamSubscr
iption[_STATE_CLOSED])) !== 0; | 885 return (dart.notNull(this[_state]) & dart.notNull(_BufferingStreamSubscr
iption[_STATE_CLOSED])) != 0; |
| 886 } | 886 } |
| 887 get [_isCanceled]() { | 887 get [_isCanceled]() { |
| 888 return (dart.notNull(this[_state]) & dart.notNull(_BufferingStreamSubscr
iption[_STATE_CANCELED])) !== 0; | 888 return (dart.notNull(this[_state]) & dart.notNull(_BufferingStreamSubscr
iption[_STATE_CANCELED])) != 0; |
| 889 } | 889 } |
| 890 get [_waitsForCancel]() { | 890 get [_waitsForCancel]() { |
| 891 return (dart.notNull(this[_state]) & dart.notNull(_BufferingStreamSubscr
iption[_STATE_WAIT_FOR_CANCEL])) !== 0; | 891 return (dart.notNull(this[_state]) & dart.notNull(_BufferingStreamSubscr
iption[_STATE_WAIT_FOR_CANCEL])) != 0; |
| 892 } | 892 } |
| 893 get [_inCallback]() { | 893 get [_inCallback]() { |
| 894 return (dart.notNull(this[_state]) & dart.notNull(_BufferingStreamSubscr
iption[_STATE_IN_CALLBACK])) !== 0; | 894 return (dart.notNull(this[_state]) & dart.notNull(_BufferingStreamSubscr
iption[_STATE_IN_CALLBACK])) != 0; |
| 895 } | 895 } |
| 896 get [_hasPending]() { | 896 get [_hasPending]() { |
| 897 return (dart.notNull(this[_state]) & dart.notNull(_BufferingStreamSubscr
iption[_STATE_HAS_PENDING])) !== 0; | 897 return (dart.notNull(this[_state]) & dart.notNull(_BufferingStreamSubscr
iption[_STATE_HAS_PENDING])) != 0; |
| 898 } | 898 } |
| 899 get [_isPaused]() { | 899 get [_isPaused]() { |
| 900 return dart.notNull(this[_state]) >= dart.notNull(_BufferingStreamSubscr
iption[_STATE_PAUSE_COUNT]); | 900 return dart.notNull(this[_state]) >= dart.notNull(_BufferingStreamSubscr
iption[_STATE_PAUSE_COUNT]); |
| 901 } | 901 } |
| 902 get [_canFire]() { | 902 get [_canFire]() { |
| 903 return dart.notNull(this[_state]) < dart.notNull(_BufferingStreamSubscri
ption[_STATE_IN_CALLBACK]); | 903 return dart.notNull(this[_state]) < dart.notNull(_BufferingStreamSubscri
ption[_STATE_IN_CALLBACK]); |
| 904 } | 904 } |
| 905 get [_mayResumeInput]() { | 905 get [_mayResumeInput]() { |
| 906 return !dart.notNull(this[_isPaused]) && (dart.notNull(this[_pending] ==
= null) || dart.notNull(this[_pending].isEmpty)); | 906 return !dart.notNull(this[_isPaused]) && (dart.notNull(this[_pending] ==
null) || dart.notNull(this[_pending].isEmpty)); |
| 907 } | 907 } |
| 908 get [_cancelOnError]() { | 908 get [_cancelOnError]() { |
| 909 return (dart.notNull(this[_state]) & dart.notNull(_BufferingStreamSubscr
iption[_STATE_CANCEL_ON_ERROR])) !== 0; | 909 return (dart.notNull(this[_state]) & dart.notNull(_BufferingStreamSubscr
iption[_STATE_CANCEL_ON_ERROR])) != 0; |
| 910 } | 910 } |
| 911 get isPaused() { | 911 get isPaused() { |
| 912 return this[_isPaused]; | 912 return this[_isPaused]; |
| 913 } | 913 } |
| 914 [_cancel]() { | 914 [_cancel]() { |
| 915 this[_state] = _BufferingStreamSubscription[_STATE_CANCELED]; | 915 this[_state] = _BufferingStreamSubscription[_STATE_CANCELED]; |
| 916 if (this[_hasPending]) { | 916 if (this[_hasPending]) { |
| 917 this[_pending].cancelSchedule(); | 917 this[_pending].cancelSchedule(); |
| 918 } | 918 } |
| 919 if (!dart.notNull(this[_inCallback])) | 919 if (!dart.notNull(this[_inCallback])) |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 962 } | 962 } |
| 963 [_onResume]() { | 963 [_onResume]() { |
| 964 dart.assert(!dart.notNull(this[_isInputPaused])); | 964 dart.assert(!dart.notNull(this[_isInputPaused])); |
| 965 } | 965 } |
| 966 [_onCancel]() { | 966 [_onCancel]() { |
| 967 dart.assert(this[_isCanceled]); | 967 dart.assert(this[_isCanceled]); |
| 968 return null; | 968 return null; |
| 969 } | 969 } |
| 970 [_addPending](event) { | 970 [_addPending](event) { |
| 971 let pending = dart.as(this[_pending], _StreamImplEvents); | 971 let pending = dart.as(this[_pending], _StreamImplEvents); |
| 972 if (this[_pending] === null) | 972 if (this[_pending] == null) |
| 973 pending = this[_pending] = new _StreamImplEvents(); | 973 pending = this[_pending] = new _StreamImplEvents(); |
| 974 pending.add(event); | 974 pending.add(event); |
| 975 if (!dart.notNull(this[_hasPending])) { | 975 if (!dart.notNull(this[_hasPending])) { |
| 976 this[_state] = _BufferingStreamSubscription[_STATE_HAS_PENDING]; | 976 this[_state] = _BufferingStreamSubscription[_STATE_HAS_PENDING]; |
| 977 if (!dart.notNull(this[_isPaused])) { | 977 if (!dart.notNull(this[_isPaused])) { |
| 978 this[_pending].schedule(this); | 978 this[_pending].schedule(this); |
| 979 } | 979 } |
| 980 } | 980 } |
| 981 } | 981 } |
| 982 [_sendData](data) { | 982 [_sendData](data) { |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1054 if (dart.notNull(this[_isInputPaused]) && dart.notNull(this[_mayResume
Input])) { | 1054 if (dart.notNull(this[_isInputPaused]) && dart.notNull(this[_mayResume
Input])) { |
| 1055 this[_state] = ~dart.notNull(_BufferingStreamSubscription[_STATE_INP
UT_PAUSED]); | 1055 this[_state] = ~dart.notNull(_BufferingStreamSubscription[_STATE_INP
UT_PAUSED]); |
| 1056 } | 1056 } |
| 1057 } | 1057 } |
| 1058 while (true) { | 1058 while (true) { |
| 1059 if (this[_isCanceled]) { | 1059 if (this[_isCanceled]) { |
| 1060 this[_pending] = null; | 1060 this[_pending] = null; |
| 1061 return; | 1061 return; |
| 1062 } | 1062 } |
| 1063 let isInputPaused = this[_isInputPaused]; | 1063 let isInputPaused = this[_isInputPaused]; |
| 1064 if (wasInputPaused === isInputPaused) | 1064 if (wasInputPaused == isInputPaused) |
| 1065 break; | 1065 break; |
| 1066 this[_state] = _BufferingStreamSubscription[_STATE_IN_CALLBACK]; | 1066 this[_state] = _BufferingStreamSubscription[_STATE_IN_CALLBACK]; |
| 1067 if (isInputPaused) { | 1067 if (isInputPaused) { |
| 1068 this[_onPause](); | 1068 this[_onPause](); |
| 1069 } else { | 1069 } else { |
| 1070 this[_onResume](); | 1070 this[_onResume](); |
| 1071 } | 1071 } |
| 1072 this[_state] = ~dart.notNull(_BufferingStreamSubscription[_STATE_IN_CA
LLBACK]); | 1072 this[_state] = ~dart.notNull(_BufferingStreamSubscription[_STATE_IN_CA
LLBACK]); |
| 1073 wasInputPaused = isInputPaused; | 1073 wasInputPaused = isInputPaused; |
| 1074 } | 1074 } |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1114 this[_eventState] = null; | 1114 this[_eventState] = null; |
| 1115 this[_next] = null; | 1115 this[_next] = null; |
| 1116 this[_previous] = null; | 1116 this[_previous] = null; |
| 1117 super._ControllerSubscription(dart.as(controller, _StreamControllerLifec
ycle$(T)), onData, onError, onDone, cancelOnError); | 1117 super._ControllerSubscription(dart.as(controller, _StreamControllerLifec
ycle$(T)), onData, onError, onDone, cancelOnError); |
| 1118 this[_next] = this[_previous] = this; | 1118 this[_next] = this[_previous] = this; |
| 1119 } | 1119 } |
| 1120 get [_controller]() { | 1120 get [_controller]() { |
| 1121 return dart.as(super[_controller], _BroadcastStreamController); | 1121 return dart.as(super[_controller], _BroadcastStreamController); |
| 1122 } | 1122 } |
| 1123 [_expectsEvent](eventId) { | 1123 [_expectsEvent](eventId) { |
| 1124 return (dart.notNull(this[_eventState]) & dart.notNull(_BroadcastSubscri
ption[_STATE_EVENT_ID])) === eventId; | 1124 return (dart.notNull(this[_eventState]) & dart.notNull(_BroadcastSubscri
ption[_STATE_EVENT_ID])) == eventId; |
| 1125 } | 1125 } |
| 1126 [_toggleEventId]() { | 1126 [_toggleEventId]() { |
| 1127 this[_eventState] = _BroadcastSubscription[_STATE_EVENT_ID]; | 1127 this[_eventState] = _BroadcastSubscription[_STATE_EVENT_ID]; |
| 1128 } | 1128 } |
| 1129 get [_isFiring]() { | 1129 get [_isFiring]() { |
| 1130 return (dart.notNull(this[_eventState]) & dart.notNull(_BroadcastSubscri
ption[_STATE_FIRING])) !== 0; | 1130 return (dart.notNull(this[_eventState]) & dart.notNull(_BroadcastSubscri
ption[_STATE_FIRING])) != 0; |
| 1131 } | 1131 } |
| 1132 [_setRemoveAfterFiring]() { | 1132 [_setRemoveAfterFiring]() { |
| 1133 dart.assert(this[_isFiring]); | 1133 dart.assert(this[_isFiring]); |
| 1134 this[_eventState] = _BroadcastSubscription[_STATE_REMOVE_AFTER_FIRING]; | 1134 this[_eventState] = _BroadcastSubscription[_STATE_REMOVE_AFTER_FIRING]; |
| 1135 } | 1135 } |
| 1136 get [_removeAfterFiring]() { | 1136 get [_removeAfterFiring]() { |
| 1137 return (dart.notNull(this[_eventState]) & dart.notNull(_BroadcastSubscri
ption[_STATE_REMOVE_AFTER_FIRING])) !== 0; | 1137 return (dart.notNull(this[_eventState]) & dart.notNull(_BroadcastSubscri
ption[_STATE_REMOVE_AFTER_FIRING])) != 0; |
| 1138 } | 1138 } |
| 1139 [_onPause]() {} | 1139 [_onPause]() {} |
| 1140 [_onResume]() {} | 1140 [_onResume]() {} |
| 1141 } | 1141 } |
| 1142 _BroadcastSubscription._STATE_EVENT_ID = 1; | 1142 _BroadcastSubscription._STATE_EVENT_ID = 1; |
| 1143 _BroadcastSubscription._STATE_FIRING = 2; | 1143 _BroadcastSubscription._STATE_FIRING = 2; |
| 1144 _BroadcastSubscription._STATE_REMOVE_AFTER_FIRING = 4; | 1144 _BroadcastSubscription._STATE_REMOVE_AFTER_FIRING = 4; |
| 1145 return _BroadcastSubscription; | 1145 return _BroadcastSubscription; |
| 1146 }); | 1146 }); |
| 1147 let _BroadcastSubscription = _BroadcastSubscription$(dart.dynamic); | 1147 let _BroadcastSubscription = _BroadcastSubscription$(dart.dynamic); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 1176 this[_doneFuture] = null; | 1176 this[_doneFuture] = null; |
| 1177 this[_next] = this[_previous] = this; | 1177 this[_next] = this[_previous] = this; |
| 1178 } | 1178 } |
| 1179 get stream() { | 1179 get stream() { |
| 1180 return new _BroadcastStream(this); | 1180 return new _BroadcastStream(this); |
| 1181 } | 1181 } |
| 1182 get sink() { | 1182 get sink() { |
| 1183 return new _StreamSinkWrapper(this); | 1183 return new _StreamSinkWrapper(this); |
| 1184 } | 1184 } |
| 1185 get isClosed() { | 1185 get isClosed() { |
| 1186 return (dart.notNull(this[_state]) & dart.notNull(_BroadcastStreamContro
ller[_STATE_CLOSED])) !== 0; | 1186 return (dart.notNull(this[_state]) & dart.notNull(_BroadcastStreamContro
ller[_STATE_CLOSED])) != 0; |
| 1187 } | 1187 } |
| 1188 get isPaused() { | 1188 get isPaused() { |
| 1189 return false; | 1189 return false; |
| 1190 } | 1190 } |
| 1191 get hasListener() { | 1191 get hasListener() { |
| 1192 return !dart.notNull(this[_isEmpty]); | 1192 return !dart.notNull(this[_isEmpty]); |
| 1193 } | 1193 } |
| 1194 get [_hasOneListener]() { | 1194 get [_hasOneListener]() { |
| 1195 dart.assert(!dart.notNull(this[_isEmpty])); | 1195 dart.assert(!dart.notNull(this[_isEmpty])); |
| 1196 return core.identical(this[_next][_next], this); | 1196 return core.identical(this[_next][_next], this); |
| 1197 } | 1197 } |
| 1198 get [_isFiring]() { | 1198 get [_isFiring]() { |
| 1199 return (dart.notNull(this[_state]) & dart.notNull(_BroadcastStreamContro
ller[_STATE_FIRING])) !== 0; | 1199 return (dart.notNull(this[_state]) & dart.notNull(_BroadcastStreamContro
ller[_STATE_FIRING])) != 0; |
| 1200 } | 1200 } |
| 1201 get [_isAddingStream]() { | 1201 get [_isAddingStream]() { |
| 1202 return (dart.notNull(this[_state]) & dart.notNull(_BroadcastStreamContro
ller[_STATE_ADDSTREAM])) !== 0; | 1202 return (dart.notNull(this[_state]) & dart.notNull(_BroadcastStreamContro
ller[_STATE_ADDSTREAM])) != 0; |
| 1203 } | 1203 } |
| 1204 get [_mayAddEvent]() { | 1204 get [_mayAddEvent]() { |
| 1205 return dart.notNull(this[_state]) < dart.notNull(_BroadcastStreamControl
ler[_STATE_CLOSED]); | 1205 return dart.notNull(this[_state]) < dart.notNull(_BroadcastStreamControl
ler[_STATE_CLOSED]); |
| 1206 } | 1206 } |
| 1207 [_ensureDoneFuture]() { | 1207 [_ensureDoneFuture]() { |
| 1208 if (this[_doneFuture] !== null) | 1208 if (this[_doneFuture] != null) |
| 1209 return this[_doneFuture]; | 1209 return this[_doneFuture]; |
| 1210 return this[_doneFuture] = new _Future(); | 1210 return this[_doneFuture] = new _Future(); |
| 1211 } | 1211 } |
| 1212 get [_isEmpty]() { | 1212 get [_isEmpty]() { |
| 1213 return core.identical(this[_next], this); | 1213 return core.identical(this[_next], this); |
| 1214 } | 1214 } |
| 1215 [_addListener](subscription) { | 1215 [_addListener](subscription) { |
| 1216 dart.assert(core.identical(subscription[_next], subscription)); | 1216 dart.assert(core.identical(subscription[_next], subscription)); |
| 1217 subscription[_previous] = this[_previous]; | 1217 subscription[_previous] = this[_previous]; |
| 1218 subscription[_next] = this; | 1218 subscription[_next] = this; |
| 1219 this[_previous][_next] = subscription; | 1219 this[_previous][_next] = subscription; |
| 1220 this[_previous] = subscription; | 1220 this[_previous] = subscription; |
| 1221 subscription[_eventState] = dart.notNull(this[_state]) & dart.notNull(_B
roadcastStreamController[_STATE_EVENT_ID]); | 1221 subscription[_eventState] = dart.notNull(this[_state]) & dart.notNull(_B
roadcastStreamController[_STATE_EVENT_ID]); |
| 1222 } | 1222 } |
| 1223 [_removeListener](subscription) { | 1223 [_removeListener](subscription) { |
| 1224 dart.assert(core.identical(subscription[_controller], this)); | 1224 dart.assert(core.identical(subscription[_controller], this)); |
| 1225 dart.assert(!dart.notNull(core.identical(subscription[_next], subscripti
on))); | 1225 dart.assert(!dart.notNull(core.identical(subscription[_next], subscripti
on))); |
| 1226 let previous = subscription[_previous]; | 1226 let previous = subscription[_previous]; |
| 1227 let next = subscription[_next]; | 1227 let next = subscription[_next]; |
| 1228 previous[_next] = next; | 1228 previous[_next] = next; |
| 1229 next[_previous] = previous; | 1229 next[_previous] = previous; |
| 1230 subscription[_next] = subscription[_previous] = subscription; | 1230 subscription[_next] = subscription[_previous] = subscription; |
| 1231 } | 1231 } |
| 1232 [_subscribe](onData, onError, onDone, cancelOnError) { | 1232 [_subscribe](onData, onError, onDone, cancelOnError) { |
| 1233 if (this.isClosed) { | 1233 if (this.isClosed) { |
| 1234 if (onDone === null) | 1234 if (onDone == null) |
| 1235 onDone = _nullDoneHandler; | 1235 onDone = _nullDoneHandler; |
| 1236 return new _DoneStreamSubscription(onDone); | 1236 return new _DoneStreamSubscription(onDone); |
| 1237 } | 1237 } |
| 1238 let subscription = new _BroadcastSubscription(this, onData, onError, onD
one, cancelOnError); | 1238 let subscription = new _BroadcastSubscription(this, onData, onError, onD
one, cancelOnError); |
| 1239 this[_addListener](dart.as(subscription, _BroadcastSubscription$(T))); | 1239 this[_addListener](dart.as(subscription, _BroadcastSubscription$(T))); |
| 1240 if (core.identical(this[_next], this[_previous])) { | 1240 if (core.identical(this[_next], this[_previous])) { |
| 1241 _runGuarded(this[_onListen]); | 1241 _runGuarded(this[_onListen]); |
| 1242 } | 1242 } |
| 1243 return dart.as(subscription, StreamSubscription$(T)); | 1243 return dart.as(subscription, StreamSubscription$(T)); |
| 1244 } | 1244 } |
| (...skipping 26 matching lines...) Expand all Loading... |
| 1271 throw this[_addEventError](); | 1271 throw this[_addEventError](); |
| 1272 this[_sendData](data); | 1272 this[_sendData](data); |
| 1273 } | 1273 } |
| 1274 addError(error, stackTrace) { | 1274 addError(error, stackTrace) { |
| 1275 if (stackTrace === void 0) | 1275 if (stackTrace === void 0) |
| 1276 stackTrace = null; | 1276 stackTrace = null; |
| 1277 error = _nonNullError(error); | 1277 error = _nonNullError(error); |
| 1278 if (!dart.notNull(this[_mayAddEvent])) | 1278 if (!dart.notNull(this[_mayAddEvent])) |
| 1279 throw this[_addEventError](); | 1279 throw this[_addEventError](); |
| 1280 let replacement = Zone.current.errorCallback(error, stackTrace); | 1280 let replacement = Zone.current.errorCallback(error, stackTrace); |
| 1281 if (replacement !== null) { | 1281 if (replacement != null) { |
| 1282 error = _nonNullError(replacement.error); | 1282 error = _nonNullError(replacement.error); |
| 1283 stackTrace = replacement.stackTrace; | 1283 stackTrace = replacement.stackTrace; |
| 1284 } | 1284 } |
| 1285 this[_sendError](error, stackTrace); | 1285 this[_sendError](error, stackTrace); |
| 1286 } | 1286 } |
| 1287 close() { | 1287 close() { |
| 1288 if (this.isClosed) { | 1288 if (this.isClosed) { |
| 1289 dart.assert(this[_doneFuture] !== null); | 1289 dart.assert(this[_doneFuture] != null); |
| 1290 return this[_doneFuture]; | 1290 return this[_doneFuture]; |
| 1291 } | 1291 } |
| 1292 if (!dart.notNull(this[_mayAddEvent])) | 1292 if (!dart.notNull(this[_mayAddEvent])) |
| 1293 throw this[_addEventError](); | 1293 throw this[_addEventError](); |
| 1294 this[_state] = _BroadcastStreamController[_STATE_CLOSED]; | 1294 this[_state] = _BroadcastStreamController[_STATE_CLOSED]; |
| 1295 let doneFuture = this[_ensureDoneFuture](); | 1295 let doneFuture = this[_ensureDoneFuture](); |
| 1296 this[_sendDone](); | 1296 this[_sendDone](); |
| 1297 return doneFuture; | 1297 return doneFuture; |
| 1298 } | 1298 } |
| 1299 get done() { | 1299 get done() { |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1393 this[_forEachListener](((subscription) => { | 1393 this[_forEachListener](((subscription) => { |
| 1394 subscription._addError(error, stackTrace); | 1394 subscription._addError(error, stackTrace); |
| 1395 }).bind(this)); | 1395 }).bind(this)); |
| 1396 } | 1396 } |
| 1397 [_sendDone]() { | 1397 [_sendDone]() { |
| 1398 if (!dart.notNull(this[_isEmpty])) { | 1398 if (!dart.notNull(this[_isEmpty])) { |
| 1399 this[_forEachListener](dart.closureWrap(((subscription) => { | 1399 this[_forEachListener](dart.closureWrap(((subscription) => { |
| 1400 subscription._close(); | 1400 subscription._close(); |
| 1401 }).bind(this), "(_BufferingStreamSubscription<T>) → void")); | 1401 }).bind(this), "(_BufferingStreamSubscription<T>) → void")); |
| 1402 } else { | 1402 } else { |
| 1403 dart.assert(this[_doneFuture] !== null); | 1403 dart.assert(this[_doneFuture] != null); |
| 1404 dart.assert(this[_doneFuture][_mayComplete]); | 1404 dart.assert(this[_doneFuture][_mayComplete]); |
| 1405 this[_doneFuture]._asyncComplete(null); | 1405 this[_doneFuture]._asyncComplete(null); |
| 1406 } | 1406 } |
| 1407 } | 1407 } |
| 1408 } | 1408 } |
| 1409 return _SyncBroadcastStreamController; | 1409 return _SyncBroadcastStreamController; |
| 1410 }); | 1410 }); |
| 1411 let _SyncBroadcastStreamController = _SyncBroadcastStreamController$(dart.dyna
mic); | 1411 let _SyncBroadcastStreamController = _SyncBroadcastStreamController$(dart.dyna
mic); |
| 1412 let _AsyncBroadcastStreamController$ = dart.generic(function(T) { | 1412 let _AsyncBroadcastStreamController$ = dart.generic(function(T) { |
| 1413 class _AsyncBroadcastStreamController extends _BroadcastStreamController$(T)
{ | 1413 class _AsyncBroadcastStreamController extends _BroadcastStreamController$(T)
{ |
| (...skipping 12 matching lines...) Expand all Loading... |
| 1426 subscription._addPending(new _DelayedError(error, stackTrace)); | 1426 subscription._addPending(new _DelayedError(error, stackTrace)); |
| 1427 } | 1427 } |
| 1428 } | 1428 } |
| 1429 [_sendDone]() { | 1429 [_sendDone]() { |
| 1430 if (!dart.notNull(this[_isEmpty])) { | 1430 if (!dart.notNull(this[_isEmpty])) { |
| 1431 for (let link = this[_next]; !dart.notNull(core.identical(link, this))
; link = link[_next]) { | 1431 for (let link = this[_next]; !dart.notNull(core.identical(link, this))
; link = link[_next]) { |
| 1432 let subscription = dart.as(link, _BroadcastSubscription$(T)); | 1432 let subscription = dart.as(link, _BroadcastSubscription$(T)); |
| 1433 subscription._addPending(new _DelayedDone()); | 1433 subscription._addPending(new _DelayedDone()); |
| 1434 } | 1434 } |
| 1435 } else { | 1435 } else { |
| 1436 dart.assert(this[_doneFuture] !== null); | 1436 dart.assert(this[_doneFuture] != null); |
| 1437 dart.assert(this[_doneFuture][_mayComplete]); | 1437 dart.assert(this[_doneFuture][_mayComplete]); |
| 1438 this[_doneFuture]._asyncComplete(null); | 1438 this[_doneFuture]._asyncComplete(null); |
| 1439 } | 1439 } |
| 1440 } | 1440 } |
| 1441 } | 1441 } |
| 1442 return _AsyncBroadcastStreamController; | 1442 return _AsyncBroadcastStreamController; |
| 1443 }); | 1443 }); |
| 1444 let _AsyncBroadcastStreamController = _AsyncBroadcastStreamController$(dart.dy
namic); | 1444 let _AsyncBroadcastStreamController = _AsyncBroadcastStreamController$(dart.dy
namic); |
| 1445 let _addPendingEvent = Symbol('_addPendingEvent'); | 1445 let _addPendingEvent = Symbol('_addPendingEvent'); |
| 1446 let _AsBroadcastStreamController$ = dart.generic(function(T) { | 1446 let _AsBroadcastStreamController$ = dart.generic(function(T) { |
| 1447 class _AsBroadcastStreamController extends _SyncBroadcastStreamController$(T
) { | 1447 class _AsBroadcastStreamController extends _SyncBroadcastStreamController$(T
) { |
| 1448 _AsBroadcastStreamController(onListen, onCancel) { | 1448 _AsBroadcastStreamController(onListen, onCancel) { |
| 1449 this[_pending] = null; | 1449 this[_pending] = null; |
| 1450 super._SyncBroadcastStreamController(onListen, onCancel); | 1450 super._SyncBroadcastStreamController(onListen, onCancel); |
| 1451 } | 1451 } |
| 1452 get [_hasPending]() { | 1452 get [_hasPending]() { |
| 1453 return dart.notNull(this[_pending] !== null) && !dart.notNull(this[_pend
ing].isEmpty); | 1453 return dart.notNull(this[_pending] != null) && !dart.notNull(this[_pendi
ng].isEmpty); |
| 1454 } | 1454 } |
| 1455 [_addPendingEvent](event) { | 1455 [_addPendingEvent](event) { |
| 1456 if (this[_pending] === null) { | 1456 if (this[_pending] == null) { |
| 1457 this[_pending] = new _StreamImplEvents(); | 1457 this[_pending] = new _StreamImplEvents(); |
| 1458 } | 1458 } |
| 1459 this[_pending].add(event); | 1459 this[_pending].add(event); |
| 1460 } | 1460 } |
| 1461 add(data) { | 1461 add(data) { |
| 1462 if (!dart.notNull(this.isClosed) && dart.notNull(this[_isFiring])) { | 1462 if (!dart.notNull(this.isClosed) && dart.notNull(this[_isFiring])) { |
| 1463 this[_addPendingEvent](new _DelayedData(data)); | 1463 this[_addPendingEvent](new _DelayedData(data)); |
| 1464 return; | 1464 return; |
| 1465 } | 1465 } |
| 1466 super.add(data); | 1466 super.add(data); |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1509 class _DoneSubscription extends core.Object { | 1509 class _DoneSubscription extends core.Object { |
| 1510 _DoneSubscription() { | 1510 _DoneSubscription() { |
| 1511 this[_pauseCount] = 0; | 1511 this[_pauseCount] = 0; |
| 1512 } | 1512 } |
| 1513 onData(handleData) {} | 1513 onData(handleData) {} |
| 1514 onError(handleError) {} | 1514 onError(handleError) {} |
| 1515 onDone(handleDone) {} | 1515 onDone(handleDone) {} |
| 1516 pause(resumeSignal) { | 1516 pause(resumeSignal) { |
| 1517 if (resumeSignal === void 0) | 1517 if (resumeSignal === void 0) |
| 1518 resumeSignal = null; | 1518 resumeSignal = null; |
| 1519 if (resumeSignal !== null) | 1519 if (resumeSignal != null) |
| 1520 resumeSignal.then(this[_resume]); | 1520 resumeSignal.then(this[_resume]); |
| 1521 this[_pauseCount] = dart.notNull(this[_pauseCount]) + 1; | 1521 this[_pauseCount] = dart.notNull(this[_pauseCount]) + 1; |
| 1522 } | 1522 } |
| 1523 resume() { | 1523 resume() { |
| 1524 this[_resume](null); | 1524 this[_resume](null); |
| 1525 } | 1525 } |
| 1526 [_resume](_) { | 1526 [_resume](_) { |
| 1527 if (dart.notNull(this[_pauseCount]) > 0) | 1527 if (dart.notNull(this[_pauseCount]) > 0) |
| 1528 this[_pauseCount] = dart.notNull(this[_pauseCount]) - 1; | 1528 this[_pauseCount] = dart.notNull(this[_pauseCount]) - 1; |
| 1529 } | 1529 } |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1603 if (value === void 0) | 1603 if (value === void 0) |
| 1604 value = null; | 1604 value = null; |
| 1605 return new _Future.immediate(value); | 1605 return new _Future.immediate(value); |
| 1606 } | 1606 } |
| 1607 error(error, stackTrace) { | 1607 error(error, stackTrace) { |
| 1608 if (stackTrace === void 0) | 1608 if (stackTrace === void 0) |
| 1609 stackTrace = null; | 1609 stackTrace = null; |
| 1610 error = _nonNullError(error); | 1610 error = _nonNullError(error); |
| 1611 if (!dart.notNull(core.identical(Zone.current, _ROOT_ZONE))) { | 1611 if (!dart.notNull(core.identical(Zone.current, _ROOT_ZONE))) { |
| 1612 let replacement = Zone.current.errorCallback(error, stackTrace); | 1612 let replacement = Zone.current.errorCallback(error, stackTrace); |
| 1613 if (replacement !== null) { | 1613 if (replacement != null) { |
| 1614 error = _nonNullError(replacement.error); | 1614 error = _nonNullError(replacement.error); |
| 1615 stackTrace = replacement.stackTrace; | 1615 stackTrace = replacement.stackTrace; |
| 1616 } | 1616 } |
| 1617 } | 1617 } |
| 1618 return new _Future.immediateError(error, stackTrace); | 1618 return new _Future.immediateError(error, stackTrace); |
| 1619 } | 1619 } |
| 1620 delayed(duration, computation) { | 1620 delayed(duration, computation) { |
| 1621 if (computation === void 0) | 1621 if (computation === void 0) |
| 1622 computation = null; | 1622 computation = null; |
| 1623 let result = new _Future(); | 1623 let result = new _Future(); |
| 1624 new Timer(duration, (() => { | 1624 new Timer(duration, (() => { |
| 1625 try { | 1625 try { |
| 1626 result._complete(computation === null ? null : computation()); | 1626 result._complete(computation == null ? null : computation()); |
| 1627 } catch (e) { | 1627 } catch (e) { |
| 1628 let s = dart.stackTrace(e); | 1628 let s = dart.stackTrace(e); |
| 1629 _completeWithErrorCallback(result, e, s); | 1629 _completeWithErrorCallback(result, e, s); |
| 1630 } | 1630 } |
| 1631 | 1631 |
| 1632 }).bind(this)); | 1632 }).bind(this)); |
| 1633 return dart.as(result, Future$(T)); | 1633 return dart.as(result, Future$(T)); |
| 1634 } | 1634 } |
| 1635 static wait(futures, opts) { | 1635 static wait(futures, opts) { |
| 1636 let eagerError = opts && 'eagerError' in opts ? opts.eagerError : false; | 1636 let eagerError = opts && 'eagerError' in opts ? opts.eagerError : false; |
| 1637 let cleanUp = opts && 'cleanUp' in opts ? opts.cleanUp : null; | 1637 let cleanUp = opts && 'cleanUp' in opts ? opts.cleanUp : null; |
| 1638 let result = new _Future(); | 1638 let result = new _Future(); |
| 1639 let values = null; | 1639 let values = null; |
| 1640 let remaining = 0; | 1640 let remaining = 0; |
| 1641 let error = null; | 1641 let error = null; |
| 1642 let stackTrace = null; | 1642 let stackTrace = null; |
| 1643 // Function handleError: (dynamic, dynamic) → void | 1643 // Function handleError: (dynamic, dynamic) → void |
| 1644 function handleError(theError, theStackTrace) { | 1644 function handleError(theError, theStackTrace) { |
| 1645 remaining = dart.notNull(remaining) - 1; | 1645 remaining = dart.notNull(remaining) - 1; |
| 1646 if (values !== null) { | 1646 if (values != null) { |
| 1647 if (cleanUp !== null) { | 1647 if (cleanUp != null) { |
| 1648 for (let value of values) { | 1648 for (let value of values) { |
| 1649 if (value !== null) { | 1649 if (value != null) { |
| 1650 new Future.sync(() => { | 1650 new Future.sync(() => { |
| 1651 dart.dinvokef(cleanUp, value); | 1651 dart.dinvokef(cleanUp, value); |
| 1652 }); | 1652 }); |
| 1653 } | 1653 } |
| 1654 } | 1654 } |
| 1655 } | 1655 } |
| 1656 values = null; | 1656 values = null; |
| 1657 if (remaining === 0 || dart.notNull(eagerError)) { | 1657 if (remaining == 0 || dart.notNull(eagerError)) { |
| 1658 result._completeError(theError, dart.as(theStackTrace, core.StackT
race)); | 1658 result._completeError(theError, dart.as(theStackTrace, core.StackT
race)); |
| 1659 } else { | 1659 } else { |
| 1660 error = theError; | 1660 error = theError; |
| 1661 stackTrace = dart.as(theStackTrace, core.StackTrace); | 1661 stackTrace = dart.as(theStackTrace, core.StackTrace); |
| 1662 } | 1662 } |
| 1663 } else if (remaining === 0 && !dart.notNull(eagerError)) { | 1663 } else if (remaining == 0 && !dart.notNull(eagerError)) { |
| 1664 result._completeError(error, stackTrace); | 1664 result._completeError(error, stackTrace); |
| 1665 } | 1665 } |
| 1666 } | 1666 } |
| 1667 for (let future of futures) { | 1667 for (let future of futures) { |
| 1668 let pos = ((x) => remaining = dart.notNull(x) + 1, x)(remaining); | 1668 let pos = ((x) => remaining = dart.notNull(x) + 1, x)(remaining); |
| 1669 future.then(((value) => { | 1669 future.then(((value) => { |
| 1670 remaining = dart.notNull(remaining) - 1; | 1670 remaining = dart.notNull(remaining) - 1; |
| 1671 if (values !== null) { | 1671 if (values != null) { |
| 1672 values.set(pos, value); | 1672 values.set(pos, value); |
| 1673 if (remaining === 0) { | 1673 if (remaining == 0) { |
| 1674 result._completeWithValue(values); | 1674 result._completeWithValue(values); |
| 1675 } | 1675 } |
| 1676 } else { | 1676 } else { |
| 1677 if (dart.notNull(cleanUp !== null) && dart.notNull(value !== null)
) { | 1677 if (dart.notNull(cleanUp != null) && dart.notNull(value != null))
{ |
| 1678 new Future.sync(() => { | 1678 new Future.sync(() => { |
| 1679 dart.dinvokef(cleanUp, value); | 1679 dart.dinvokef(cleanUp, value); |
| 1680 }); | 1680 }); |
| 1681 } | 1681 } |
| 1682 if (remaining === 0 && !dart.notNull(eagerError)) { | 1682 if (remaining == 0 && !dart.notNull(eagerError)) { |
| 1683 result._completeError(error, stackTrace); | 1683 result._completeError(error, stackTrace); |
| 1684 } | 1684 } |
| 1685 } | 1685 } |
| 1686 }).bind(this), {onError: handleError}); | 1686 }).bind(this), {onError: handleError}); |
| 1687 } | 1687 } |
| 1688 if (remaining === 0) { | 1688 if (remaining == 0) { |
| 1689 return dart.as(new Future.value(/* Unimplemented const */new core.List
.from([])), Future$(core.List)); | 1689 return dart.as(new Future.value(/* Unimplemented const */new core.List
.from([])), Future$(core.List)); |
| 1690 } | 1690 } |
| 1691 values = new core.List(remaining); | 1691 values = new core.List(remaining); |
| 1692 return result; | 1692 return result; |
| 1693 } | 1693 } |
| 1694 static forEach(input, f) { | 1694 static forEach(input, f) { |
| 1695 let iterator = input.iterator; | 1695 let iterator = input.iterator; |
| 1696 return Future.doWhile((() => { | 1696 return Future.doWhile((() => { |
| 1697 if (!dart.notNull(iterator.moveNext())) | 1697 if (!dart.notNull(iterator.moveNext())) |
| 1698 return false; | 1698 return false; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 1728 let Future = Future$(dart.dynamic); | 1728 let Future = Future$(dart.dynamic); |
| 1729 class TimeoutException extends core.Object { | 1729 class TimeoutException extends core.Object { |
| 1730 TimeoutException(message, duration) { | 1730 TimeoutException(message, duration) { |
| 1731 if (duration === void 0) | 1731 if (duration === void 0) |
| 1732 duration = null; | 1732 duration = null; |
| 1733 this.message = message; | 1733 this.message = message; |
| 1734 this.duration = duration; | 1734 this.duration = duration; |
| 1735 } | 1735 } |
| 1736 toString() { | 1736 toString() { |
| 1737 let result = "TimeoutException"; | 1737 let result = "TimeoutException"; |
| 1738 if (this.duration !== null) | 1738 if (this.duration != null) |
| 1739 result = `TimeoutException after ${this.duration}`; | 1739 result = `TimeoutException after ${this.duration}`; |
| 1740 if (this.message !== null) | 1740 if (this.message != null) |
| 1741 result = `${result}: ${this.message}`; | 1741 result = `${result}: ${this.message}`; |
| 1742 return result; | 1742 return result; |
| 1743 } | 1743 } |
| 1744 } | 1744 } |
| 1745 let Completer$ = dart.generic(function(T) { | 1745 let Completer$ = dart.generic(function(T) { |
| 1746 class Completer extends core.Object { | 1746 class Completer extends core.Object { |
| 1747 Completer() { | 1747 Completer() { |
| 1748 return new _AsyncCompleter(); | 1748 return new _AsyncCompleter(); |
| 1749 } | 1749 } |
| 1750 sync() { | 1750 sync() { |
| 1751 return new _SyncCompleter(); | 1751 return new _SyncCompleter(); |
| 1752 } | 1752 } |
| 1753 } | 1753 } |
| 1754 dart.defineNamedConstructor(Completer, 'sync'); | 1754 dart.defineNamedConstructor(Completer, 'sync'); |
| 1755 return Completer; | 1755 return Completer; |
| 1756 }); | 1756 }); |
| 1757 let Completer = Completer$(dart.dynamic); | 1757 let Completer = Completer$(dart.dynamic); |
| 1758 // Function _completeWithErrorCallback: (_Future<dynamic>, dynamic, dynamic) →
void | 1758 // Function _completeWithErrorCallback: (_Future<dynamic>, dynamic, dynamic) →
void |
| 1759 function _completeWithErrorCallback(result, error, stackTrace) { | 1759 function _completeWithErrorCallback(result, error, stackTrace) { |
| 1760 let replacement = Zone.current.errorCallback(error, dart.as(stackTrace, core
.StackTrace)); | 1760 let replacement = Zone.current.errorCallback(error, dart.as(stackTrace, core
.StackTrace)); |
| 1761 if (replacement !== null) { | 1761 if (replacement != null) { |
| 1762 error = _nonNullError(replacement.error); | 1762 error = _nonNullError(replacement.error); |
| 1763 stackTrace = replacement.stackTrace; | 1763 stackTrace = replacement.stackTrace; |
| 1764 } | 1764 } |
| 1765 result._completeError(error, dart.as(stackTrace, core.StackTrace)); | 1765 result._completeError(error, dart.as(stackTrace, core.StackTrace)); |
| 1766 } | 1766 } |
| 1767 // Function _nonNullError: (Object) → Object | 1767 // Function _nonNullError: (Object) → Object |
| 1768 function _nonNullError(error) { | 1768 function _nonNullError(error) { |
| 1769 return error !== null ? error : new core.NullThrownError(); | 1769 return error != null ? error : new core.NullThrownError(); |
| 1770 } | 1770 } |
| 1771 let _Completer$ = dart.generic(function(T) { | 1771 let _Completer$ = dart.generic(function(T) { |
| 1772 class _Completer extends core.Object { | 1772 class _Completer extends core.Object { |
| 1773 _Completer() { | 1773 _Completer() { |
| 1774 this.future = new _Future(); | 1774 this.future = new _Future(); |
| 1775 } | 1775 } |
| 1776 completeError(error, stackTrace) { | 1776 completeError(error, stackTrace) { |
| 1777 if (stackTrace === void 0) | 1777 if (stackTrace === void 0) |
| 1778 stackTrace = null; | 1778 stackTrace = null; |
| 1779 error = _nonNullError(error); | 1779 error = _nonNullError(error); |
| 1780 if (!dart.notNull(this.future[_mayComplete])) | 1780 if (!dart.notNull(this.future[_mayComplete])) |
| 1781 throw new core.StateError("Future already completed"); | 1781 throw new core.StateError("Future already completed"); |
| 1782 let replacement = Zone.current.errorCallback(error, stackTrace); | 1782 let replacement = Zone.current.errorCallback(error, stackTrace); |
| 1783 if (replacement !== null) { | 1783 if (replacement != null) { |
| 1784 error = _nonNullError(replacement.error); | 1784 error = _nonNullError(replacement.error); |
| 1785 stackTrace = replacement.stackTrace; | 1785 stackTrace = replacement.stackTrace; |
| 1786 } | 1786 } |
| 1787 this[_completeError](error, stackTrace); | 1787 this[_completeError](error, stackTrace); |
| 1788 } | 1788 } |
| 1789 get isCompleted() { | 1789 get isCompleted() { |
| 1790 return !dart.notNull(this.future[_mayComplete]); | 1790 return !dart.notNull(this.future[_mayComplete]); |
| 1791 } | 1791 } |
| 1792 } | 1792 } |
| 1793 return _Completer; | 1793 return _Completer; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1827 let _SyncCompleter = _SyncCompleter$(dart.dynamic); | 1827 let _SyncCompleter = _SyncCompleter$(dart.dynamic); |
| 1828 let _nextListener = Symbol('_nextListener'); | 1828 let _nextListener = Symbol('_nextListener'); |
| 1829 let _onValue = Symbol('_onValue'); | 1829 let _onValue = Symbol('_onValue'); |
| 1830 let _errorTest = Symbol('_errorTest'); | 1830 let _errorTest = Symbol('_errorTest'); |
| 1831 let _whenCompleteAction = Symbol('_whenCompleteAction'); | 1831 let _whenCompleteAction = Symbol('_whenCompleteAction'); |
| 1832 class _FutureListener extends core.Object { | 1832 class _FutureListener extends core.Object { |
| 1833 then(result, onValue, errorCallback) { | 1833 then(result, onValue, errorCallback) { |
| 1834 this.result = result; | 1834 this.result = result; |
| 1835 this.callback = onValue; | 1835 this.callback = onValue; |
| 1836 this.errorCallback = errorCallback; | 1836 this.errorCallback = errorCallback; |
| 1837 this.state = errorCallback === null ? _FutureListener.STATE_THEN : _Future
Listener.STATE_THEN_ONERROR; | 1837 this.state = errorCallback == null ? _FutureListener.STATE_THEN : _FutureL
istener.STATE_THEN_ONERROR; |
| 1838 this[_nextListener] = null; | 1838 this[_nextListener] = null; |
| 1839 } | 1839 } |
| 1840 catchError(result, errorCallback, test) { | 1840 catchError(result, errorCallback, test) { |
| 1841 this.result = result; | 1841 this.result = result; |
| 1842 this.errorCallback = errorCallback; | 1842 this.errorCallback = errorCallback; |
| 1843 this.callback = test; | 1843 this.callback = test; |
| 1844 this.state = test === null ? _FutureListener.STATE_CATCHERROR : _FutureLis
tener.STATE_CATCHERROR_TEST; | 1844 this.state = test == null ? _FutureListener.STATE_CATCHERROR : _FutureList
ener.STATE_CATCHERROR_TEST; |
| 1845 this[_nextListener] = null; | 1845 this[_nextListener] = null; |
| 1846 } | 1846 } |
| 1847 whenComplete(result, onComplete) { | 1847 whenComplete(result, onComplete) { |
| 1848 this.result = result; | 1848 this.result = result; |
| 1849 this.callback = onComplete; | 1849 this.callback = onComplete; |
| 1850 this.errorCallback = null; | 1850 this.errorCallback = null; |
| 1851 this.state = _FutureListener.STATE_WHENCOMPLETE; | 1851 this.state = _FutureListener.STATE_WHENCOMPLETE; |
| 1852 this[_nextListener] = null; | 1852 this[_nextListener] = null; |
| 1853 } | 1853 } |
| 1854 chain(result) { | 1854 chain(result) { |
| 1855 this.result = result; | 1855 this.result = result; |
| 1856 this.callback = null; | 1856 this.callback = null; |
| 1857 this.errorCallback = null; | 1857 this.errorCallback = null; |
| 1858 this.state = _FutureListener.STATE_CHAIN; | 1858 this.state = _FutureListener.STATE_CHAIN; |
| 1859 this[_nextListener] = null; | 1859 this[_nextListener] = null; |
| 1860 } | 1860 } |
| 1861 get [_zone]() { | 1861 get [_zone]() { |
| 1862 return this.result[_zone]; | 1862 return this.result[_zone]; |
| 1863 } | 1863 } |
| 1864 get handlesValue() { | 1864 get handlesValue() { |
| 1865 return (dart.notNull(this.state) & dart.notNull(_FutureListener.MASK_VALUE
)) !== 0; | 1865 return (dart.notNull(this.state) & dart.notNull(_FutureListener.MASK_VALUE
)) != 0; |
| 1866 } | 1866 } |
| 1867 get handlesError() { | 1867 get handlesError() { |
| 1868 return (dart.notNull(this.state) & dart.notNull(_FutureListener.MASK_ERROR
)) !== 0; | 1868 return (dart.notNull(this.state) & dart.notNull(_FutureListener.MASK_ERROR
)) != 0; |
| 1869 } | 1869 } |
| 1870 get hasErrorTest() { | 1870 get hasErrorTest() { |
| 1871 return this.state === _FutureListener.STATE_CATCHERROR_TEST; | 1871 return this.state == _FutureListener.STATE_CATCHERROR_TEST; |
| 1872 } | 1872 } |
| 1873 get handlesComplete() { | 1873 get handlesComplete() { |
| 1874 return this.state === _FutureListener.STATE_WHENCOMPLETE; | 1874 return this.state == _FutureListener.STATE_WHENCOMPLETE; |
| 1875 } | 1875 } |
| 1876 get [_onValue]() { | 1876 get [_onValue]() { |
| 1877 dart.assert(this.handlesValue); | 1877 dart.assert(this.handlesValue); |
| 1878 return dart.as(this.callback, _FutureOnValue); | 1878 return dart.as(this.callback, _FutureOnValue); |
| 1879 } | 1879 } |
| 1880 get [_onError]() { | 1880 get [_onError]() { |
| 1881 return this.errorCallback; | 1881 return this.errorCallback; |
| 1882 } | 1882 } |
| 1883 get [_errorTest]() { | 1883 get [_errorTest]() { |
| 1884 dart.assert(this.hasErrorTest); | 1884 dart.assert(this.hasErrorTest); |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1941 } | 1941 } |
| 1942 immediateError(error, stackTrace) { | 1942 immediateError(error, stackTrace) { |
| 1943 if (stackTrace === void 0) | 1943 if (stackTrace === void 0) |
| 1944 stackTrace = null; | 1944 stackTrace = null; |
| 1945 this[_zone] = Zone.current; | 1945 this[_zone] = Zone.current; |
| 1946 this[_state] = _Future[_INCOMPLETE]; | 1946 this[_state] = _Future[_INCOMPLETE]; |
| 1947 this[_resultOrListeners] = null; | 1947 this[_resultOrListeners] = null; |
| 1948 this[_asyncCompleteError](error, stackTrace); | 1948 this[_asyncCompleteError](error, stackTrace); |
| 1949 } | 1949 } |
| 1950 get [_mayComplete]() { | 1950 get [_mayComplete]() { |
| 1951 return this[_state] === _Future[_INCOMPLETE]; | 1951 return this[_state] == _Future[_INCOMPLETE]; |
| 1952 } | 1952 } |
| 1953 get [_isChained]() { | 1953 get [_isChained]() { |
| 1954 return this[_state] === _Future[_CHAINED]; | 1954 return this[_state] == _Future[_CHAINED]; |
| 1955 } | 1955 } |
| 1956 get [_isComplete]() { | 1956 get [_isComplete]() { |
| 1957 return dart.notNull(this[_state]) >= dart.notNull(_Future[_VALUE]); | 1957 return dart.notNull(this[_state]) >= dart.notNull(_Future[_VALUE]); |
| 1958 } | 1958 } |
| 1959 get [_hasValue]() { | 1959 get [_hasValue]() { |
| 1960 return this[_state] === _Future[_VALUE]; | 1960 return this[_state] == _Future[_VALUE]; |
| 1961 } | 1961 } |
| 1962 get [_hasError]() { | 1962 get [_hasError]() { |
| 1963 return this[_state] === _Future[_ERROR]; | 1963 return this[_state] == _Future[_ERROR]; |
| 1964 } | 1964 } |
| 1965 set [_isChained](value) { | 1965 set [_isChained](value) { |
| 1966 if (value) { | 1966 if (value) { |
| 1967 dart.assert(!dart.notNull(this[_isComplete])); | 1967 dart.assert(!dart.notNull(this[_isComplete])); |
| 1968 this[_state] = _Future[_CHAINED]; | 1968 this[_state] = _Future[_CHAINED]; |
| 1969 } else { | 1969 } else { |
| 1970 dart.assert(this[_isChained]); | 1970 dart.assert(this[_isChained]); |
| 1971 this[_state] = _Future[_INCOMPLETE]; | 1971 this[_state] = _Future[_INCOMPLETE]; |
| 1972 } | 1972 } |
| 1973 } | 1973 } |
| 1974 then(f, opts) { | 1974 then(f, opts) { |
| 1975 let onError = opts && 'onError' in opts ? opts.onError : null; | 1975 let onError = opts && 'onError' in opts ? opts.onError : null; |
| 1976 let result = new _Future(); | 1976 let result = new _Future(); |
| 1977 if (!dart.notNull(core.identical(result[_zone], _ROOT_ZONE))) { | 1977 if (!dart.notNull(core.identical(result[_zone], _ROOT_ZONE))) { |
| 1978 f = dart.closureWrap(result[_zone].registerUnaryCallback(f), "(T) → dy
namic"); | 1978 f = dart.closureWrap(result[_zone].registerUnaryCallback(f), "(T) → dy
namic"); |
| 1979 if (onError !== null) { | 1979 if (onError != null) { |
| 1980 onError = _registerErrorHandler(onError, result[_zone]); | 1980 onError = _registerErrorHandler(onError, result[_zone]); |
| 1981 } | 1981 } |
| 1982 } | 1982 } |
| 1983 this[_addListener](new _FutureListener.then(result, f, onError)); | 1983 this[_addListener](new _FutureListener.then(result, f, onError)); |
| 1984 return result; | 1984 return result; |
| 1985 } | 1985 } |
| 1986 catchError(onError, opts) { | 1986 catchError(onError, opts) { |
| 1987 let test = opts && 'test' in opts ? opts.test : null; | 1987 let test = opts && 'test' in opts ? opts.test : null; |
| 1988 let result = new _Future(); | 1988 let result = new _Future(); |
| 1989 if (!dart.notNull(core.identical(result[_zone], _ROOT_ZONE))) { | 1989 if (!dart.notNull(core.identical(result[_zone], _ROOT_ZONE))) { |
| 1990 onError = _registerErrorHandler(onError, result[_zone]); | 1990 onError = _registerErrorHandler(onError, result[_zone]); |
| 1991 if (test !== null) | 1991 if (test != null) |
| 1992 test = dart.closureWrap(result[_zone].registerUnaryCallback(test), "
(dynamic) → bool"); | 1992 test = dart.closureWrap(result[_zone].registerUnaryCallback(test), "
(dynamic) → bool"); |
| 1993 } | 1993 } |
| 1994 this[_addListener](new _FutureListener.catchError(result, onError, test)
); | 1994 this[_addListener](new _FutureListener.catchError(result, onError, test)
); |
| 1995 return result; | 1995 return result; |
| 1996 } | 1996 } |
| 1997 whenComplete(action) { | 1997 whenComplete(action) { |
| 1998 let result = new _Future(); | 1998 let result = new _Future(); |
| 1999 if (!dart.notNull(core.identical(result[_zone], _ROOT_ZONE))) { | 1999 if (!dart.notNull(core.identical(result[_zone], _ROOT_ZONE))) { |
| 2000 action = result[_zone].registerCallback(action); | 2000 action = result[_zone].registerCallback(action); |
| 2001 } | 2001 } |
| (...skipping 23 matching lines...) Expand all Loading... |
| 2025 } | 2025 } |
| 2026 [_setErrorObject](error) { | 2026 [_setErrorObject](error) { |
| 2027 dart.assert(!dart.notNull(this[_isComplete])); | 2027 dart.assert(!dart.notNull(this[_isComplete])); |
| 2028 this[_state] = _Future[_ERROR]; | 2028 this[_state] = _Future[_ERROR]; |
| 2029 this[_resultOrListeners] = error; | 2029 this[_resultOrListeners] = error; |
| 2030 } | 2030 } |
| 2031 [_setError](error, stackTrace) { | 2031 [_setError](error, stackTrace) { |
| 2032 this[_setErrorObject](new AsyncError(error, stackTrace)); | 2032 this[_setErrorObject](new AsyncError(error, stackTrace)); |
| 2033 } | 2033 } |
| 2034 [_addListener](listener) { | 2034 [_addListener](listener) { |
| 2035 dart.assert(listener[_nextListener] === null); | 2035 dart.assert(listener[_nextListener] == null); |
| 2036 if (this[_isComplete]) { | 2036 if (this[_isComplete]) { |
| 2037 this[_zone].scheduleMicrotask((() => { | 2037 this[_zone].scheduleMicrotask((() => { |
| 2038 _Future[_propagateToListeners](this, listener); | 2038 _Future[_propagateToListeners](this, listener); |
| 2039 }).bind(this)); | 2039 }).bind(this)); |
| 2040 } else { | 2040 } else { |
| 2041 listener[_nextListener] = dart.as(this[_resultOrListeners], _FutureLis
tener); | 2041 listener[_nextListener] = dart.as(this[_resultOrListeners], _FutureLis
tener); |
| 2042 this[_resultOrListeners] = listener; | 2042 this[_resultOrListeners] = listener; |
| 2043 } | 2043 } |
| 2044 } | 2044 } |
| 2045 [_removeListeners]() { | 2045 [_removeListeners]() { |
| 2046 dart.assert(!dart.notNull(this[_isComplete])); | 2046 dart.assert(!dart.notNull(this[_isComplete])); |
| 2047 let current = dart.as(this[_resultOrListeners], _FutureListener); | 2047 let current = dart.as(this[_resultOrListeners], _FutureListener); |
| 2048 this[_resultOrListeners] = null; | 2048 this[_resultOrListeners] = null; |
| 2049 let prev = null; | 2049 let prev = null; |
| 2050 while (current !== null) { | 2050 while (current != null) { |
| 2051 let next = current[_nextListener]; | 2051 let next = current[_nextListener]; |
| 2052 current[_nextListener] = prev; | 2052 current[_nextListener] = prev; |
| 2053 prev = current; | 2053 prev = current; |
| 2054 current = next; | 2054 current = next; |
| 2055 } | 2055 } |
| 2056 return prev; | 2056 return prev; |
| 2057 } | 2057 } |
| 2058 static [_chainForeignFuture](source, target) { | 2058 static [_chainForeignFuture](source, target) { |
| 2059 dart.assert(!dart.notNull(target[_isComplete])); | 2059 dart.assert(!dart.notNull(target[_isComplete])); |
| 2060 dart.assert(!dart.is(source, _Future)); | 2060 dart.assert(!dart.is(source, _Future)); |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2104 [_completeError](error, stackTrace) { | 2104 [_completeError](error, stackTrace) { |
| 2105 if (stackTrace === void 0) | 2105 if (stackTrace === void 0) |
| 2106 stackTrace = null; | 2106 stackTrace = null; |
| 2107 dart.assert(!dart.notNull(this[_isComplete])); | 2107 dart.assert(!dart.notNull(this[_isComplete])); |
| 2108 let listeners = this[_removeListeners](); | 2108 let listeners = this[_removeListeners](); |
| 2109 this[_setError](error, stackTrace); | 2109 this[_setError](error, stackTrace); |
| 2110 _Future[_propagateToListeners](this, listeners); | 2110 _Future[_propagateToListeners](this, listeners); |
| 2111 } | 2111 } |
| 2112 [_asyncComplete](value) { | 2112 [_asyncComplete](value) { |
| 2113 dart.assert(!dart.notNull(this[_isComplete])); | 2113 dart.assert(!dart.notNull(this[_isComplete])); |
| 2114 if (value === null) { | 2114 if (value == null) { |
| 2115 } else if (dart.is(value, Future)) { | 2115 } else if (dart.is(value, Future)) { |
| 2116 let typedFuture = dart.as(value, Future$(T)); | 2116 let typedFuture = dart.as(value, Future$(T)); |
| 2117 if (dart.is(typedFuture, _Future)) { | 2117 if (dart.is(typedFuture, _Future)) { |
| 2118 let coreFuture = dart.as(typedFuture, _Future$(T)); | 2118 let coreFuture = dart.as(typedFuture, _Future$(T)); |
| 2119 if (dart.notNull(coreFuture[_isComplete]) && dart.notNull(coreFuture
[_hasError])) { | 2119 if (dart.notNull(coreFuture[_isComplete]) && dart.notNull(coreFuture
[_hasError])) { |
| 2120 this[_markPendingCompletion](); | 2120 this[_markPendingCompletion](); |
| 2121 this[_zone].scheduleMicrotask((() => { | 2121 this[_zone].scheduleMicrotask((() => { |
| 2122 _Future[_chainCoreFuture](coreFuture, this); | 2122 _Future[_chainCoreFuture](coreFuture, this); |
| 2123 }).bind(this)); | 2123 }).bind(this)); |
| 2124 } else { | 2124 } else { |
| (...skipping 15 matching lines...) Expand all Loading... |
| 2140 dart.assert(!dart.notNull(this[_isComplete])); | 2140 dart.assert(!dart.notNull(this[_isComplete])); |
| 2141 this[_markPendingCompletion](); | 2141 this[_markPendingCompletion](); |
| 2142 this[_zone].scheduleMicrotask((() => { | 2142 this[_zone].scheduleMicrotask((() => { |
| 2143 this[_completeError](error, stackTrace); | 2143 this[_completeError](error, stackTrace); |
| 2144 }).bind(this)); | 2144 }).bind(this)); |
| 2145 } | 2145 } |
| 2146 static [_propagateToListeners](source, listeners) { | 2146 static [_propagateToListeners](source, listeners) { |
| 2147 while (true) { | 2147 while (true) { |
| 2148 dart.assert(source[_isComplete]); | 2148 dart.assert(source[_isComplete]); |
| 2149 let hasError = source[_hasError]; | 2149 let hasError = source[_hasError]; |
| 2150 if (listeners === null) { | 2150 if (listeners == null) { |
| 2151 if (hasError) { | 2151 if (hasError) { |
| 2152 let asyncError = source[_error]; | 2152 let asyncError = source[_error]; |
| 2153 source[_zone].handleUncaughtError(asyncError.error, asyncError.sta
ckTrace); | 2153 source[_zone].handleUncaughtError(asyncError.error, asyncError.sta
ckTrace); |
| 2154 } | 2154 } |
| 2155 return; | 2155 return; |
| 2156 } | 2156 } |
| 2157 while (listeners[_nextListener] !== null) { | 2157 while (listeners[_nextListener] != null) { |
| 2158 let listener = listeners; | 2158 let listener = listeners; |
| 2159 listeners = listener[_nextListener]; | 2159 listeners = listener[_nextListener]; |
| 2160 listener[_nextListener] = null; | 2160 listener[_nextListener] = null; |
| 2161 _Future[_propagateToListeners](source, listener); | 2161 _Future[_propagateToListeners](source, listener); |
| 2162 } | 2162 } |
| 2163 let listener = listeners; | 2163 let listener = listeners; |
| 2164 let listenerHasValue = true; | 2164 let listenerHasValue = true; |
| 2165 let sourceValue = hasError ? null : source[_value]; | 2165 let sourceValue = hasError ? null : source[_value]; |
| 2166 let listenerValueOrError = sourceValue; | 2166 let listenerValueOrError = sourceValue; |
| 2167 let isPropagationAborted = false; | 2167 let isPropagationAborted = false; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 2198 matchesTest = dart.as(zone.runUnary(test, asyncError.error), c
ore.bool); | 2198 matchesTest = dart.as(zone.runUnary(test, asyncError.error), c
ore.bool); |
| 2199 } catch (e) { | 2199 } catch (e) { |
| 2200 let s = dart.stackTrace(e); | 2200 let s = dart.stackTrace(e); |
| 2201 listenerValueOrError = core.identical(asyncError.error, e) ? a
syncError : new AsyncError(e, s); | 2201 listenerValueOrError = core.identical(asyncError.error, e) ? a
syncError : new AsyncError(e, s); |
| 2202 listenerHasValue = false; | 2202 listenerHasValue = false; |
| 2203 return; | 2203 return; |
| 2204 } | 2204 } |
| 2205 | 2205 |
| 2206 } | 2206 } |
| 2207 let errorCallback = listener[_onError]; | 2207 let errorCallback = listener[_onError]; |
| 2208 if (dart.notNull(matchesTest) && dart.notNull(errorCallback !== nu
ll)) { | 2208 if (dart.notNull(matchesTest) && dart.notNull(errorCallback != nul
l)) { |
| 2209 try { | 2209 try { |
| 2210 if (dart.is(errorCallback, ZoneBinaryCallback)) { | 2210 if (dart.is(errorCallback, ZoneBinaryCallback)) { |
| 2211 listenerValueOrError = zone.runBinary(errorCallback, asyncEr
ror.error, asyncError.stackTrace); | 2211 listenerValueOrError = zone.runBinary(errorCallback, asyncEr
ror.error, asyncError.stackTrace); |
| 2212 } else { | 2212 } else { |
| 2213 listenerValueOrError = zone.runUnary(dart.as(errorCallback,
dart.throw_("Unimplemented type (dynamic) → dynamic")), asyncError.error); | 2213 listenerValueOrError = zone.runUnary(dart.as(errorCallback,
dart.throw_("Unimplemented type (dynamic) → dynamic")), asyncError.error); |
| 2214 } | 2214 } |
| 2215 } catch (e) { | 2215 } catch (e) { |
| 2216 let s = dart.stackTrace(e); | 2216 let s = dart.stackTrace(e); |
| 2217 listenerValueOrError = core.identical(asyncError.error, e) ? a
syncError : new AsyncError(e, s); | 2217 listenerValueOrError = core.identical(asyncError.error, e) ? a
syncError : new AsyncError(e, s); |
| 2218 listenerHasValue = false; | 2218 listenerHasValue = false; |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2263 if (!dart.notNull(hasError)) { | 2263 if (!dart.notNull(hasError)) { |
| 2264 if (listener.handlesValue) { | 2264 if (listener.handlesValue) { |
| 2265 listenerHasValue = handleValueCallback(); | 2265 listenerHasValue = handleValueCallback(); |
| 2266 } | 2266 } |
| 2267 } else { | 2267 } else { |
| 2268 handleError(); | 2268 handleError(); |
| 2269 } | 2269 } |
| 2270 if (listener.handlesComplete) { | 2270 if (listener.handlesComplete) { |
| 2271 handleWhenCompleteCallback(); | 2271 handleWhenCompleteCallback(); |
| 2272 } | 2272 } |
| 2273 if (oldZone !== null) | 2273 if (oldZone != null) |
| 2274 Zone._leave(oldZone); | 2274 Zone._leave(oldZone); |
| 2275 if (isPropagationAborted) | 2275 if (isPropagationAborted) |
| 2276 return; | 2276 return; |
| 2277 if (dart.notNull(listenerHasValue) && !dart.notNull(core.identical(s
ourceValue, listenerValueOrError)) && dart.notNull(dart.is(listenerValueOrError,
Future))) { | 2277 if (dart.notNull(listenerHasValue) && !dart.notNull(core.identical(s
ourceValue, listenerValueOrError)) && dart.notNull(dart.is(listenerValueOrError,
Future))) { |
| 2278 let chainSource = dart.as(listenerValueOrError, Future); | 2278 let chainSource = dart.as(listenerValueOrError, Future); |
| 2279 let result = listener.result; | 2279 let result = listener.result; |
| 2280 if (dart.is(chainSource, _Future)) { | 2280 if (dart.is(chainSource, _Future)) { |
| 2281 if (chainSource[_isComplete]) { | 2281 if (chainSource[_isComplete]) { |
| 2282 result[_isChained] = true; | 2282 result[_isChained] = true; |
| 2283 source = chainSource; | 2283 source = chainSource; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 2302 } | 2302 } |
| 2303 source = result; | 2303 source = result; |
| 2304 } | 2304 } |
| 2305 } | 2305 } |
| 2306 timeout(timeLimit, opts) { | 2306 timeout(timeLimit, opts) { |
| 2307 let onTimeout = opts && 'onTimeout' in opts ? opts.onTimeout : null; | 2307 let onTimeout = opts && 'onTimeout' in opts ? opts.onTimeout : null; |
| 2308 if (this[_isComplete]) | 2308 if (this[_isComplete]) |
| 2309 return new _Future.immediate(this); | 2309 return new _Future.immediate(this); |
| 2310 let result = new _Future(); | 2310 let result = new _Future(); |
| 2311 let timer = null; | 2311 let timer = null; |
| 2312 if (onTimeout === null) { | 2312 if (onTimeout == null) { |
| 2313 timer = new Timer(timeLimit, (() => { | 2313 timer = new Timer(timeLimit, (() => { |
| 2314 result._completeError(new TimeoutException("Future not completed", t
imeLimit)); | 2314 result._completeError(new TimeoutException("Future not completed", t
imeLimit)); |
| 2315 }).bind(this)); | 2315 }).bind(this)); |
| 2316 } else { | 2316 } else { |
| 2317 let zone = Zone.current; | 2317 let zone = Zone.current; |
| 2318 onTimeout = zone.registerCallback(onTimeout); | 2318 onTimeout = zone.registerCallback(onTimeout); |
| 2319 timer = new Timer(timeLimit, (() => { | 2319 timer = new Timer(timeLimit, (() => { |
| 2320 try { | 2320 try { |
| 2321 result._complete(zone.run(onTimeout)); | 2321 result._complete(zone.run(onTimeout)); |
| 2322 } catch (e) { | 2322 } catch (e) { |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2355 this.callback = callback; | 2355 this.callback = callback; |
| 2356 this.next = null; | 2356 this.next = null; |
| 2357 } | 2357 } |
| 2358 } | 2358 } |
| 2359 exports._nextCallback = null; | 2359 exports._nextCallback = null; |
| 2360 exports._lastCallback = null; | 2360 exports._lastCallback = null; |
| 2361 exports._lastPriorityCallback = null; | 2361 exports._lastPriorityCallback = null; |
| 2362 exports._isInCallbackLoop = false; | 2362 exports._isInCallbackLoop = false; |
| 2363 // Function _asyncRunCallbackLoop: () → void | 2363 // Function _asyncRunCallbackLoop: () → void |
| 2364 function _asyncRunCallbackLoop() { | 2364 function _asyncRunCallbackLoop() { |
| 2365 while (exports._nextCallback !== null) { | 2365 while (exports._nextCallback != null) { |
| 2366 exports._lastPriorityCallback = null; | 2366 exports._lastPriorityCallback = null; |
| 2367 let entry = exports._nextCallback; | 2367 let entry = exports._nextCallback; |
| 2368 exports._nextCallback = entry.next; | 2368 exports._nextCallback = entry.next; |
| 2369 if (exports._nextCallback === null) | 2369 if (exports._nextCallback == null) |
| 2370 exports._lastCallback = null; | 2370 exports._lastCallback = null; |
| 2371 entry.callback(); | 2371 entry.callback(); |
| 2372 } | 2372 } |
| 2373 } | 2373 } |
| 2374 // Function _asyncRunCallback: () → void | 2374 // Function _asyncRunCallback: () → void |
| 2375 function _asyncRunCallback() { | 2375 function _asyncRunCallback() { |
| 2376 exports._isInCallbackLoop = true; | 2376 exports._isInCallbackLoop = true; |
| 2377 try { | 2377 try { |
| 2378 _asyncRunCallbackLoop(); | 2378 _asyncRunCallbackLoop(); |
| 2379 } finally { | 2379 } finally { |
| 2380 exports._lastPriorityCallback = null; | 2380 exports._lastPriorityCallback = null; |
| 2381 exports._isInCallbackLoop = false; | 2381 exports._isInCallbackLoop = false; |
| 2382 if (exports._nextCallback !== null) | 2382 if (exports._nextCallback != null) |
| 2383 _AsyncRun._scheduleImmediate(_asyncRunCallback); | 2383 _AsyncRun._scheduleImmediate(_asyncRunCallback); |
| 2384 } | 2384 } |
| 2385 } | 2385 } |
| 2386 // Function _scheduleAsyncCallback: (dynamic) → void | 2386 // Function _scheduleAsyncCallback: (dynamic) → void |
| 2387 function _scheduleAsyncCallback(callback) { | 2387 function _scheduleAsyncCallback(callback) { |
| 2388 if (exports._nextCallback === null) { | 2388 if (exports._nextCallback == null) { |
| 2389 exports._nextCallback = exports._lastCallback = new _AsyncCallbackEntry(da
rt.as(callback, _AsyncCallback)); | 2389 exports._nextCallback = exports._lastCallback = new _AsyncCallbackEntry(da
rt.as(callback, _AsyncCallback)); |
| 2390 if (!dart.notNull(exports._isInCallbackLoop)) { | 2390 if (!dart.notNull(exports._isInCallbackLoop)) { |
| 2391 _AsyncRun._scheduleImmediate(_asyncRunCallback); | 2391 _AsyncRun._scheduleImmediate(_asyncRunCallback); |
| 2392 } | 2392 } |
| 2393 } else { | 2393 } else { |
| 2394 let newEntry = new _AsyncCallbackEntry(dart.as(callback, _AsyncCallback)); | 2394 let newEntry = new _AsyncCallbackEntry(dart.as(callback, _AsyncCallback)); |
| 2395 exports._lastCallback.next = newEntry; | 2395 exports._lastCallback.next = newEntry; |
| 2396 exports._lastCallback = newEntry; | 2396 exports._lastCallback = newEntry; |
| 2397 } | 2397 } |
| 2398 } | 2398 } |
| 2399 // Function _schedulePriorityAsyncCallback: (dynamic) → void | 2399 // Function _schedulePriorityAsyncCallback: (dynamic) → void |
| 2400 function _schedulePriorityAsyncCallback(callback) { | 2400 function _schedulePriorityAsyncCallback(callback) { |
| 2401 let entry = new _AsyncCallbackEntry(dart.as(callback, _AsyncCallback)); | 2401 let entry = new _AsyncCallbackEntry(dart.as(callback, _AsyncCallback)); |
| 2402 if (exports._nextCallback === null) { | 2402 if (exports._nextCallback == null) { |
| 2403 _scheduleAsyncCallback(callback); | 2403 _scheduleAsyncCallback(callback); |
| 2404 exports._lastPriorityCallback = exports._lastCallback; | 2404 exports._lastPriorityCallback = exports._lastCallback; |
| 2405 } else if (exports._lastPriorityCallback === null) { | 2405 } else if (exports._lastPriorityCallback == null) { |
| 2406 entry.next = exports._nextCallback; | 2406 entry.next = exports._nextCallback; |
| 2407 exports._nextCallback = exports._lastPriorityCallback = entry; | 2407 exports._nextCallback = exports._lastPriorityCallback = entry; |
| 2408 } else { | 2408 } else { |
| 2409 entry.next = exports._lastPriorityCallback.next; | 2409 entry.next = exports._lastPriorityCallback.next; |
| 2410 exports._lastPriorityCallback.next = entry; | 2410 exports._lastPriorityCallback.next = entry; |
| 2411 exports._lastPriorityCallback = entry; | 2411 exports._lastPriorityCallback = entry; |
| 2412 if (entry.next === null) { | 2412 if (entry.next == null) { |
| 2413 exports._lastCallback = entry; | 2413 exports._lastCallback = entry; |
| 2414 } | 2414 } |
| 2415 } | 2415 } |
| 2416 } | 2416 } |
| 2417 // Function scheduleMicrotask: (() → void) → void | 2417 // Function scheduleMicrotask: (() → void) → void |
| 2418 function scheduleMicrotask(callback) { | 2418 function scheduleMicrotask(callback) { |
| 2419 if (core.identical(_ROOT_ZONE, Zone.current)) { | 2419 if (core.identical(_ROOT_ZONE, Zone.current)) { |
| 2420 _rootScheduleMicrotask(null, null, _ROOT_ZONE, callback); | 2420 _rootScheduleMicrotask(null, null, _ROOT_ZONE, callback); |
| 2421 return; | 2421 return; |
| 2422 } | 2422 } |
| 2423 Zone.current.scheduleMicrotask(Zone.current.bindCallback(callback, {runGuard
ed: true})); | 2423 Zone.current.scheduleMicrotask(Zone.current.bindCallback(callback, {runGuard
ed: true})); |
| 2424 } | 2424 } |
| 2425 let _scheduleImmediate = Symbol('_scheduleImmediate'); | 2425 let _scheduleImmediate = Symbol('_scheduleImmediate'); |
| 2426 let _initializeScheduleImmediate = Symbol('_initializeScheduleImmediate'); | 2426 let _initializeScheduleImmediate = Symbol('_initializeScheduleImmediate'); |
| 2427 let _scheduleImmediateJsOverride = Symbol('_scheduleImmediateJsOverride'); | 2427 let _scheduleImmediateJsOverride = Symbol('_scheduleImmediateJsOverride'); |
| 2428 let _scheduleImmediateWithSetImmediate = Symbol('_scheduleImmediateWithSetImme
diate'); | 2428 let _scheduleImmediateWithSetImmediate = Symbol('_scheduleImmediateWithSetImme
diate'); |
| 2429 let _scheduleImmediateWithTimer = Symbol('_scheduleImmediateWithTimer'); | 2429 let _scheduleImmediateWithTimer = Symbol('_scheduleImmediateWithTimer'); |
| 2430 class _AsyncRun extends core.Object { | 2430 class _AsyncRun extends core.Object { |
| 2431 static [_scheduleImmediate](callback) { | 2431 static [_scheduleImmediate](callback) { |
| 2432 dart.dinvokef(_AsyncRun.scheduleImmediateClosure, callback); | 2432 dart.dinvokef(_AsyncRun.scheduleImmediateClosure, callback); |
| 2433 } | 2433 } |
| 2434 static [_initializeScheduleImmediate]() { | 2434 static [_initializeScheduleImmediate]() { |
| 2435 _js_helper.requiresPreamble(); | 2435 _js_helper.requiresPreamble(); |
| 2436 if (self.scheduleImmediate !== null) { | 2436 if (self.scheduleImmediate != null) { |
| 2437 return _AsyncRun[_scheduleImmediateJsOverride]; | 2437 return _AsyncRun[_scheduleImmediateJsOverride]; |
| 2438 } | 2438 } |
| 2439 if (dart.notNull(self.MutationObserver !== null) && dart.notNull(self.docu
ment !== null)) { | 2439 if (dart.notNull(self.MutationObserver != null) && dart.notNull(self.docum
ent != null)) { |
| 2440 let div = self.document.createElement("div"); | 2440 let div = self.document.createElement("div"); |
| 2441 let span = self.document.createElement("span"); | 2441 let span = self.document.createElement("span"); |
| 2442 let storedCallback = null; | 2442 let storedCallback = null; |
| 2443 // Function internalCallback: (dynamic) → dynamic | 2443 // Function internalCallback: (dynamic) → dynamic |
| 2444 function internalCallback(_) { | 2444 function internalCallback(_) { |
| 2445 _isolate_helper.leaveJsAsync(); | 2445 _isolate_helper.leaveJsAsync(); |
| 2446 let f = storedCallback; | 2446 let f = storedCallback; |
| 2447 storedCallback = null; | 2447 storedCallback = null; |
| 2448 dart.dinvokef(f); | 2448 dart.dinvokef(f); |
| 2449 } | 2449 } |
| 2450 ; | 2450 ; |
| 2451 let observer = new self.MutationObserver(_js_helper.convertDartClosureTo
JS(internalCallback, 1)); | 2451 let observer = new self.MutationObserver(_js_helper.convertDartClosureTo
JS(internalCallback, 1)); |
| 2452 observer.observe(div, {childList: true}); | 2452 observer.observe(div, {childList: true}); |
| 2453 return (callback) => { | 2453 return (callback) => { |
| 2454 dart.assert(storedCallback === null); | 2454 dart.assert(storedCallback == null); |
| 2455 _isolate_helper.enterJsAsync(); | 2455 _isolate_helper.enterJsAsync(); |
| 2456 storedCallback = callback; | 2456 storedCallback = callback; |
| 2457 div.firstChild ? div.removeChild(span) : div.appendChild(span); | 2457 div.firstChild ? div.removeChild(span) : div.appendChild(span); |
| 2458 }; | 2458 }; |
| 2459 } else if (self.setImmediate !== null) { | 2459 } else if (self.setImmediate != null) { |
| 2460 return _AsyncRun[_scheduleImmediateWithSetImmediate]; | 2460 return _AsyncRun[_scheduleImmediateWithSetImmediate]; |
| 2461 } | 2461 } |
| 2462 return _AsyncRun[_scheduleImmediateWithTimer]; | 2462 return _AsyncRun[_scheduleImmediateWithTimer]; |
| 2463 } | 2463 } |
| 2464 static [_scheduleImmediateJsOverride](callback) { | 2464 static [_scheduleImmediateJsOverride](callback) { |
| 2465 // Function internalCallback: () → dynamic | 2465 // Function internalCallback: () → dynamic |
| 2466 function internalCallback() { | 2466 function internalCallback() { |
| 2467 _isolate_helper.leaveJsAsync(); | 2467 _isolate_helper.leaveJsAsync(); |
| 2468 callback(); | 2468 callback(); |
| 2469 } | 2469 } |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2582 }); | 2582 }); |
| 2583 let _ControllerEventSinkWrapper = _ControllerEventSinkWrapper$(dart.dynamic); | 2583 let _ControllerEventSinkWrapper = _ControllerEventSinkWrapper$(dart.dynamic); |
| 2584 let StreamController$ = dart.generic(function(T) { | 2584 let StreamController$ = dart.generic(function(T) { |
| 2585 class StreamController extends core.Object { | 2585 class StreamController extends core.Object { |
| 2586 StreamController(opts) { | 2586 StreamController(opts) { |
| 2587 let onListen = opts && 'onListen' in opts ? opts.onListen : null; | 2587 let onListen = opts && 'onListen' in opts ? opts.onListen : null; |
| 2588 let onPause = opts && 'onPause' in opts ? opts.onPause : null; | 2588 let onPause = opts && 'onPause' in opts ? opts.onPause : null; |
| 2589 let onResume = opts && 'onResume' in opts ? opts.onResume : null; | 2589 let onResume = opts && 'onResume' in opts ? opts.onResume : null; |
| 2590 let onCancel = opts && 'onCancel' in opts ? opts.onCancel : null; | 2590 let onCancel = opts && 'onCancel' in opts ? opts.onCancel : null; |
| 2591 let sync = opts && 'sync' in opts ? opts.sync : false; | 2591 let sync = opts && 'sync' in opts ? opts.sync : false; |
| 2592 if (dart.notNull(onListen === null) && dart.notNull(onPause === null) &&
dart.notNull(onResume === null) && dart.notNull(onCancel === null)) { | 2592 if (dart.notNull(onListen == null) && dart.notNull(onPause == null) && d
art.notNull(onResume == null) && dart.notNull(onCancel == null)) { |
| 2593 return dart.as(sync ? new _NoCallbackSyncStreamController() : new _NoC
allbackAsyncStreamController(), StreamController$(T)); | 2593 return dart.as(sync ? new _NoCallbackSyncStreamController() : new _NoC
allbackAsyncStreamController(), StreamController$(T)); |
| 2594 } | 2594 } |
| 2595 return sync ? new _SyncStreamController(onListen, onPause, onResume, onC
ancel) : new _AsyncStreamController(onListen, onPause, onResume, onCancel); | 2595 return sync ? new _SyncStreamController(onListen, onPause, onResume, onC
ancel) : new _AsyncStreamController(onListen, onPause, onResume, onCancel); |
| 2596 } | 2596 } |
| 2597 broadcast(opts) { | 2597 broadcast(opts) { |
| 2598 let onListen = opts && 'onListen' in opts ? opts.onListen : null; | 2598 let onListen = opts && 'onListen' in opts ? opts.onListen : null; |
| 2599 let onCancel = opts && 'onCancel' in opts ? opts.onCancel : null; | 2599 let onCancel = opts && 'onCancel' in opts ? opts.onCancel : null; |
| 2600 let sync = opts && 'sync' in opts ? opts.sync : false; | 2600 let sync = opts && 'sync' in opts ? opts.sync : false; |
| 2601 return sync ? new _SyncBroadcastStreamController(onListen, onCancel) : n
ew _AsyncBroadcastStreamController(onListen, onCancel); | 2601 return sync ? new _SyncBroadcastStreamController(onListen, onCancel) : n
ew _AsyncBroadcastStreamController(onListen, onCancel); |
| 2602 } | 2602 } |
| (...skipping 30 matching lines...) Expand all Loading... |
| 2633 this[_state] = _StreamController[_STATE_INITIAL]; | 2633 this[_state] = _StreamController[_STATE_INITIAL]; |
| 2634 this[_doneFuture] = null; | 2634 this[_doneFuture] = null; |
| 2635 } | 2635 } |
| 2636 get stream() { | 2636 get stream() { |
| 2637 return dart.as(new _ControllerStream(this), Stream$(T)); | 2637 return dart.as(new _ControllerStream(this), Stream$(T)); |
| 2638 } | 2638 } |
| 2639 get sink() { | 2639 get sink() { |
| 2640 return new _StreamSinkWrapper(this); | 2640 return new _StreamSinkWrapper(this); |
| 2641 } | 2641 } |
| 2642 get [_isCanceled]() { | 2642 get [_isCanceled]() { |
| 2643 return (dart.notNull(this[_state]) & dart.notNull(_StreamController[_STA
TE_CANCELED])) !== 0; | 2643 return (dart.notNull(this[_state]) & dart.notNull(_StreamController[_STA
TE_CANCELED])) != 0; |
| 2644 } | 2644 } |
| 2645 get hasListener() { | 2645 get hasListener() { |
| 2646 return (dart.notNull(this[_state]) & dart.notNull(_StreamController[_STA
TE_SUBSCRIBED])) !== 0; | 2646 return (dart.notNull(this[_state]) & dart.notNull(_StreamController[_STA
TE_SUBSCRIBED])) != 0; |
| 2647 } | 2647 } |
| 2648 get [_isInitialState]() { | 2648 get [_isInitialState]() { |
| 2649 return (dart.notNull(this[_state]) & dart.notNull(_StreamController[_STA
TE_SUBSCRIPTION_MASK])) === _StreamController[_STATE_INITIAL]; | 2649 return (dart.notNull(this[_state]) & dart.notNull(_StreamController[_STA
TE_SUBSCRIPTION_MASK])) == _StreamController[_STATE_INITIAL]; |
| 2650 } | 2650 } |
| 2651 get isClosed() { | 2651 get isClosed() { |
| 2652 return (dart.notNull(this[_state]) & dart.notNull(_StreamController[_STA
TE_CLOSED])) !== 0; | 2652 return (dart.notNull(this[_state]) & dart.notNull(_StreamController[_STA
TE_CLOSED])) != 0; |
| 2653 } | 2653 } |
| 2654 get isPaused() { | 2654 get isPaused() { |
| 2655 return this.hasListener ? this[_subscription][_isInputPaused] : !dart.no
tNull(this[_isCanceled]); | 2655 return this.hasListener ? this[_subscription][_isInputPaused] : !dart.no
tNull(this[_isCanceled]); |
| 2656 } | 2656 } |
| 2657 get [_isAddingStream]() { | 2657 get [_isAddingStream]() { |
| 2658 return (dart.notNull(this[_state]) & dart.notNull(_StreamController[_STA
TE_ADDSTREAM])) !== 0; | 2658 return (dart.notNull(this[_state]) & dart.notNull(_StreamController[_STA
TE_ADDSTREAM])) != 0; |
| 2659 } | 2659 } |
| 2660 get [_mayAddEvent]() { | 2660 get [_mayAddEvent]() { |
| 2661 return dart.notNull(this[_state]) < dart.notNull(_StreamController[_STAT
E_CLOSED]); | 2661 return dart.notNull(this[_state]) < dart.notNull(_StreamController[_STAT
E_CLOSED]); |
| 2662 } | 2662 } |
| 2663 get [_pendingEvents]() { | 2663 get [_pendingEvents]() { |
| 2664 dart.assert(this[_isInitialState]); | 2664 dart.assert(this[_isInitialState]); |
| 2665 if (!dart.notNull(this[_isAddingStream])) { | 2665 if (!dart.notNull(this[_isAddingStream])) { |
| 2666 return dart.as(this[_varData], _PendingEvents); | 2666 return dart.as(this[_varData], _PendingEvents); |
| 2667 } | 2667 } |
| 2668 let state = dart.as(this[_varData], _StreamControllerAddStreamState); | 2668 let state = dart.as(this[_varData], _StreamControllerAddStreamState); |
| 2669 return dart.as(state.varData, _PendingEvents); | 2669 return dart.as(state.varData, _PendingEvents); |
| 2670 } | 2670 } |
| 2671 [_ensurePendingEvents]() { | 2671 [_ensurePendingEvents]() { |
| 2672 dart.assert(this[_isInitialState]); | 2672 dart.assert(this[_isInitialState]); |
| 2673 if (!dart.notNull(this[_isAddingStream])) { | 2673 if (!dart.notNull(this[_isAddingStream])) { |
| 2674 if (this[_varData] === null) | 2674 if (this[_varData] == null) |
| 2675 this[_varData] = new _StreamImplEvents(); | 2675 this[_varData] = new _StreamImplEvents(); |
| 2676 return dart.as(this[_varData], _StreamImplEvents); | 2676 return dart.as(this[_varData], _StreamImplEvents); |
| 2677 } | 2677 } |
| 2678 let state = dart.as(this[_varData], _StreamControllerAddStreamState); | 2678 let state = dart.as(this[_varData], _StreamControllerAddStreamState); |
| 2679 if (state.varData === null) | 2679 if (state.varData == null) |
| 2680 state.varData = new _StreamImplEvents(); | 2680 state.varData = new _StreamImplEvents(); |
| 2681 return dart.as(state.varData, _StreamImplEvents); | 2681 return dart.as(state.varData, _StreamImplEvents); |
| 2682 } | 2682 } |
| 2683 get [_subscription]() { | 2683 get [_subscription]() { |
| 2684 dart.assert(this.hasListener); | 2684 dart.assert(this.hasListener); |
| 2685 if (this[_isAddingStream]) { | 2685 if (this[_isAddingStream]) { |
| 2686 let addState = dart.as(this[_varData], _StreamControllerAddStreamState
); | 2686 let addState = dart.as(this[_varData], _StreamControllerAddStreamState
); |
| 2687 return dart.as(addState.varData, _ControllerSubscription); | 2687 return dart.as(addState.varData, _ControllerSubscription); |
| 2688 } | 2688 } |
| 2689 return dart.as(this[_varData], _ControllerSubscription); | 2689 return dart.as(this[_varData], _ControllerSubscription); |
| (...skipping 13 matching lines...) Expand all Loading... |
| 2703 return new _Future.immediate(null); | 2703 return new _Future.immediate(null); |
| 2704 let addState = new _StreamControllerAddStreamState(this, this[_varData],
source, cancelOnError); | 2704 let addState = new _StreamControllerAddStreamState(this, this[_varData],
source, cancelOnError); |
| 2705 this[_varData] = addState; | 2705 this[_varData] = addState; |
| 2706 this[_state] = _StreamController[_STATE_ADDSTREAM]; | 2706 this[_state] = _StreamController[_STATE_ADDSTREAM]; |
| 2707 return addState.addStreamFuture; | 2707 return addState.addStreamFuture; |
| 2708 } | 2708 } |
| 2709 get done() { | 2709 get done() { |
| 2710 return this[_ensureDoneFuture](); | 2710 return this[_ensureDoneFuture](); |
| 2711 } | 2711 } |
| 2712 [_ensureDoneFuture]() { | 2712 [_ensureDoneFuture]() { |
| 2713 if (this[_doneFuture] === null) { | 2713 if (this[_doneFuture] == null) { |
| 2714 this[_doneFuture] = this[_isCanceled] ? Future[_nullFuture] : new _Fut
ure(); | 2714 this[_doneFuture] = this[_isCanceled] ? Future[_nullFuture] : new _Fut
ure(); |
| 2715 } | 2715 } |
| 2716 return this[_doneFuture]; | 2716 return this[_doneFuture]; |
| 2717 } | 2717 } |
| 2718 add(value) { | 2718 add(value) { |
| 2719 if (!dart.notNull(this[_mayAddEvent])) | 2719 if (!dart.notNull(this[_mayAddEvent])) |
| 2720 throw this[_badEventState](); | 2720 throw this[_badEventState](); |
| 2721 this[_add](value); | 2721 this[_add](value); |
| 2722 } | 2722 } |
| 2723 addError(error, stackTrace) { | 2723 addError(error, stackTrace) { |
| 2724 if (stackTrace === void 0) | 2724 if (stackTrace === void 0) |
| 2725 stackTrace = null; | 2725 stackTrace = null; |
| 2726 error = _nonNullError(error); | 2726 error = _nonNullError(error); |
| 2727 if (!dart.notNull(this[_mayAddEvent])) | 2727 if (!dart.notNull(this[_mayAddEvent])) |
| 2728 throw this[_badEventState](); | 2728 throw this[_badEventState](); |
| 2729 let replacement = Zone.current.errorCallback(error, stackTrace); | 2729 let replacement = Zone.current.errorCallback(error, stackTrace); |
| 2730 if (replacement !== null) { | 2730 if (replacement != null) { |
| 2731 error = _nonNullError(replacement.error); | 2731 error = _nonNullError(replacement.error); |
| 2732 stackTrace = replacement.stackTrace; | 2732 stackTrace = replacement.stackTrace; |
| 2733 } | 2733 } |
| 2734 this[_addError](error, stackTrace); | 2734 this[_addError](error, stackTrace); |
| 2735 } | 2735 } |
| 2736 close() { | 2736 close() { |
| 2737 if (this.isClosed) { | 2737 if (this.isClosed) { |
| 2738 return this[_ensureDoneFuture](); | 2738 return this[_ensureDoneFuture](); |
| 2739 } | 2739 } |
| 2740 if (!dart.notNull(this[_mayAddEvent])) | 2740 if (!dart.notNull(this[_mayAddEvent])) |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2792 return dart.as(subscription, StreamSubscription$(T)); | 2792 return dart.as(subscription, StreamSubscription$(T)); |
| 2793 } | 2793 } |
| 2794 [_recordCancel](subscription) { | 2794 [_recordCancel](subscription) { |
| 2795 let result = null; | 2795 let result = null; |
| 2796 if (this[_isAddingStream]) { | 2796 if (this[_isAddingStream]) { |
| 2797 let addState = dart.as(this[_varData], _StreamControllerAddStreamState
); | 2797 let addState = dart.as(this[_varData], _StreamControllerAddStreamState
); |
| 2798 result = addState.cancel(); | 2798 result = addState.cancel(); |
| 2799 } | 2799 } |
| 2800 this[_varData] = null; | 2800 this[_varData] = null; |
| 2801 this[_state] = dart.notNull(this[_state]) & ~(dart.notNull(_StreamContro
ller[_STATE_SUBSCRIBED]) | dart.notNull(_StreamController[_STATE_ADDSTREAM])) |
dart.notNull(_StreamController[_STATE_CANCELED]); | 2801 this[_state] = dart.notNull(this[_state]) & ~(dart.notNull(_StreamContro
ller[_STATE_SUBSCRIBED]) | dart.notNull(_StreamController[_STATE_ADDSTREAM])) |
dart.notNull(_StreamController[_STATE_CANCELED]); |
| 2802 if (this[_onCancel] !== null) { | 2802 if (this[_onCancel] != null) { |
| 2803 if (result === null) { | 2803 if (result == null) { |
| 2804 try { | 2804 try { |
| 2805 result = dart.as(this[_onCancel](), Future); | 2805 result = dart.as(this[_onCancel](), Future); |
| 2806 } catch (e) { | 2806 } catch (e) { |
| 2807 let s = dart.stackTrace(e); | 2807 let s = dart.stackTrace(e); |
| 2808 result = ((_$) => { | 2808 result = ((_$) => { |
| 2809 _$._asyncCompleteError(e, s); | 2809 _$._asyncCompleteError(e, s); |
| 2810 return _$; | 2810 return _$; |
| 2811 }).bind(this)(new _Future()); | 2811 }).bind(this)(new _Future()); |
| 2812 } | 2812 } |
| 2813 | 2813 |
| 2814 } else { | 2814 } else { |
| 2815 result = result.whenComplete(this[_onCancel]); | 2815 result = result.whenComplete(this[_onCancel]); |
| 2816 } | 2816 } |
| 2817 } | 2817 } |
| 2818 // Function complete: () → void | 2818 // Function complete: () → void |
| 2819 function complete() { | 2819 function complete() { |
| 2820 if (dart.notNull(this[_doneFuture] !== null) && dart.notNull(this[_don
eFuture][_mayComplete])) { | 2820 if (dart.notNull(this[_doneFuture] != null) && dart.notNull(this[_done
Future][_mayComplete])) { |
| 2821 this[_doneFuture]._asyncComplete(null); | 2821 this[_doneFuture]._asyncComplete(null); |
| 2822 } | 2822 } |
| 2823 } | 2823 } |
| 2824 if (result !== null) { | 2824 if (result != null) { |
| 2825 result = result.whenComplete(complete); | 2825 result = result.whenComplete(complete); |
| 2826 } else { | 2826 } else { |
| 2827 complete(); | 2827 complete(); |
| 2828 } | 2828 } |
| 2829 return result; | 2829 return result; |
| 2830 } | 2830 } |
| 2831 [_recordPause](subscription) { | 2831 [_recordPause](subscription) { |
| 2832 if (this[_isAddingStream]) { | 2832 if (this[_isAddingStream]) { |
| 2833 let addState = dart.as(this[_varData], _StreamControllerAddStreamState
); | 2833 let addState = dart.as(this[_varData], _StreamControllerAddStreamState
); |
| 2834 addState.pause(); | 2834 addState.pause(); |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2921 get [_onCancel]() { | 2921 get [_onCancel]() { |
| 2922 return null; | 2922 return null; |
| 2923 } | 2923 } |
| 2924 } | 2924 } |
| 2925 class _NoCallbackAsyncStreamController extends dart.mixin(_AsyncStreamControll
erDispatch, _NoCallbacks) { | 2925 class _NoCallbackAsyncStreamController extends dart.mixin(_AsyncStreamControll
erDispatch, _NoCallbacks) { |
| 2926 } | 2926 } |
| 2927 class _NoCallbackSyncStreamController extends dart.mixin(_SyncStreamController
Dispatch, _NoCallbacks) { | 2927 class _NoCallbackSyncStreamController extends dart.mixin(_SyncStreamController
Dispatch, _NoCallbacks) { |
| 2928 } | 2928 } |
| 2929 // Function _runGuarded: (() → dynamic) → Future<dynamic> | 2929 // Function _runGuarded: (() → dynamic) → Future<dynamic> |
| 2930 function _runGuarded(notificationHandler) { | 2930 function _runGuarded(notificationHandler) { |
| 2931 if (notificationHandler === null) | 2931 if (notificationHandler == null) |
| 2932 return null; | 2932 return null; |
| 2933 try { | 2933 try { |
| 2934 let result = notificationHandler(); | 2934 let result = notificationHandler(); |
| 2935 if (dart.is(result, Future)) | 2935 if (dart.is(result, Future)) |
| 2936 return dart.as(result, Future); | 2936 return dart.as(result, Future); |
| 2937 return null; | 2937 return null; |
| 2938 } catch (e) { | 2938 } catch (e) { |
| 2939 let s = dart.stackTrace(e); | 2939 let s = dart.stackTrace(e); |
| 2940 Zone.current.handleUncaughtError(e, s); | 2940 Zone.current.handleUncaughtError(e, s); |
| 2941 } | 2941 } |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2982 }).bind(this); | 2982 }).bind(this); |
| 2983 } | 2983 } |
| 2984 pause() { | 2984 pause() { |
| 2985 this.addSubscription.pause(); | 2985 this.addSubscription.pause(); |
| 2986 } | 2986 } |
| 2987 resume() { | 2987 resume() { |
| 2988 this.addSubscription.resume(); | 2988 this.addSubscription.resume(); |
| 2989 } | 2989 } |
| 2990 cancel() { | 2990 cancel() { |
| 2991 let cancel = this.addSubscription.cancel(); | 2991 let cancel = this.addSubscription.cancel(); |
| 2992 if (cancel === null) { | 2992 if (cancel == null) { |
| 2993 this.addStreamFuture._asyncComplete(null); | 2993 this.addStreamFuture._asyncComplete(null); |
| 2994 return null; | 2994 return null; |
| 2995 } | 2995 } |
| 2996 return cancel.whenComplete((() => { | 2996 return cancel.whenComplete((() => { |
| 2997 this.addStreamFuture._asyncComplete(null); | 2997 this.addStreamFuture._asyncComplete(null); |
| 2998 }).bind(this)); | 2998 }).bind(this)); |
| 2999 } | 2999 } |
| 3000 complete() { | 3000 complete() { |
| 3001 this.addStreamFuture._asyncComplete(null); | 3001 this.addStreamFuture._asyncComplete(null); |
| 3002 } | 3002 } |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3052 let _GeneratedStreamImpl = _GeneratedStreamImpl$(dart.dynamic); | 3052 let _GeneratedStreamImpl = _GeneratedStreamImpl$(dart.dynamic); |
| 3053 let _iterator = Symbol('_iterator'); | 3053 let _iterator = Symbol('_iterator'); |
| 3054 let _STATE_UNSCHEDULED = Symbol('_STATE_UNSCHEDULED'); | 3054 let _STATE_UNSCHEDULED = Symbol('_STATE_UNSCHEDULED'); |
| 3055 let _STATE_SCHEDULED = Symbol('_STATE_SCHEDULED'); | 3055 let _STATE_SCHEDULED = Symbol('_STATE_SCHEDULED'); |
| 3056 let _eventScheduled = Symbol('_eventScheduled'); | 3056 let _eventScheduled = Symbol('_eventScheduled'); |
| 3057 class _PendingEvents extends core.Object { | 3057 class _PendingEvents extends core.Object { |
| 3058 _PendingEvents() { | 3058 _PendingEvents() { |
| 3059 this[_state] = _PendingEvents[_STATE_UNSCHEDULED]; | 3059 this[_state] = _PendingEvents[_STATE_UNSCHEDULED]; |
| 3060 } | 3060 } |
| 3061 get isScheduled() { | 3061 get isScheduled() { |
| 3062 return this[_state] === _PendingEvents[_STATE_SCHEDULED]; | 3062 return this[_state] == _PendingEvents[_STATE_SCHEDULED]; |
| 3063 } | 3063 } |
| 3064 get [_eventScheduled]() { | 3064 get [_eventScheduled]() { |
| 3065 return dart.notNull(this[_state]) >= dart.notNull(_PendingEvents[_STATE_SC
HEDULED]); | 3065 return dart.notNull(this[_state]) >= dart.notNull(_PendingEvents[_STATE_SC
HEDULED]); |
| 3066 } | 3066 } |
| 3067 schedule(dispatch) { | 3067 schedule(dispatch) { |
| 3068 if (this.isScheduled) | 3068 if (this.isScheduled) |
| 3069 return; | 3069 return; |
| 3070 dart.assert(!dart.notNull(this.isEmpty)); | 3070 dart.assert(!dart.notNull(this.isEmpty)); |
| 3071 if (this[_eventScheduled]) { | 3071 if (this[_eventScheduled]) { |
| 3072 dart.assert(this[_state] === _PendingEvents[_STATE_CANCELED]); | 3072 dart.assert(this[_state] == _PendingEvents[_STATE_CANCELED]); |
| 3073 this[_state] = _PendingEvents[_STATE_SCHEDULED]; | 3073 this[_state] = _PendingEvents[_STATE_SCHEDULED]; |
| 3074 return; | 3074 return; |
| 3075 } | 3075 } |
| 3076 scheduleMicrotask((() => { | 3076 scheduleMicrotask((() => { |
| 3077 let oldState = this[_state]; | 3077 let oldState = this[_state]; |
| 3078 this[_state] = _PendingEvents[_STATE_UNSCHEDULED]; | 3078 this[_state] = _PendingEvents[_STATE_UNSCHEDULED]; |
| 3079 if (oldState === _PendingEvents[_STATE_CANCELED]) | 3079 if (oldState == _PendingEvents[_STATE_CANCELED]) |
| 3080 return; | 3080 return; |
| 3081 this.handleNext(dispatch); | 3081 this.handleNext(dispatch); |
| 3082 }).bind(this)); | 3082 }).bind(this)); |
| 3083 this[_state] = _PendingEvents[_STATE_SCHEDULED]; | 3083 this[_state] = _PendingEvents[_STATE_SCHEDULED]; |
| 3084 } | 3084 } |
| 3085 cancelSchedule() { | 3085 cancelSchedule() { |
| 3086 if (this.isScheduled) | 3086 if (this.isScheduled) |
| 3087 this[_state] = _PendingEvents[_STATE_CANCELED]; | 3087 this[_state] = _PendingEvents[_STATE_CANCELED]; |
| 3088 } | 3088 } |
| 3089 } | 3089 } |
| 3090 _PendingEvents._STATE_UNSCHEDULED = 0; | 3090 _PendingEvents._STATE_UNSCHEDULED = 0; |
| 3091 _PendingEvents._STATE_SCHEDULED = 1; | 3091 _PendingEvents._STATE_SCHEDULED = 1; |
| 3092 _PendingEvents._STATE_CANCELED = 3; | 3092 _PendingEvents._STATE_CANCELED = 3; |
| 3093 let _IterablePendingEvents$ = dart.generic(function(T) { | 3093 let _IterablePendingEvents$ = dart.generic(function(T) { |
| 3094 class _IterablePendingEvents extends _PendingEvents { | 3094 class _IterablePendingEvents extends _PendingEvents { |
| 3095 _IterablePendingEvents(data) { | 3095 _IterablePendingEvents(data) { |
| 3096 this[_iterator] = data.iterator; | 3096 this[_iterator] = data.iterator; |
| 3097 super._PendingEvents(); | 3097 super._PendingEvents(); |
| 3098 } | 3098 } |
| 3099 get isEmpty() { | 3099 get isEmpty() { |
| 3100 return this[_iterator] === null; | 3100 return this[_iterator] == null; |
| 3101 } | 3101 } |
| 3102 handleNext(dispatch) { | 3102 handleNext(dispatch) { |
| 3103 if (this[_iterator] === null) { | 3103 if (this[_iterator] == null) { |
| 3104 throw new core.StateError("No events pending."); | 3104 throw new core.StateError("No events pending."); |
| 3105 } | 3105 } |
| 3106 let isDone = null; | 3106 let isDone = null; |
| 3107 try { | 3107 try { |
| 3108 isDone = !dart.notNull(this[_iterator].moveNext()); | 3108 isDone = !dart.notNull(this[_iterator].moveNext()); |
| 3109 } catch (e) { | 3109 } catch (e) { |
| 3110 let s = dart.stackTrace(e); | 3110 let s = dart.stackTrace(e); |
| 3111 this[_iterator] = null; | 3111 this[_iterator] = null; |
| 3112 dispatch._sendError(e, s); | 3112 dispatch._sendError(e, s); |
| 3113 return; | 3113 return; |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3182 throw new core.StateError("No events after a done."); | 3182 throw new core.StateError("No events after a done."); |
| 3183 } | 3183 } |
| 3184 } | 3184 } |
| 3185 class _StreamImplEvents extends _PendingEvents { | 3185 class _StreamImplEvents extends _PendingEvents { |
| 3186 _StreamImplEvents() { | 3186 _StreamImplEvents() { |
| 3187 this.firstPendingEvent = null; | 3187 this.firstPendingEvent = null; |
| 3188 this.lastPendingEvent = null; | 3188 this.lastPendingEvent = null; |
| 3189 super._PendingEvents(); | 3189 super._PendingEvents(); |
| 3190 } | 3190 } |
| 3191 get isEmpty() { | 3191 get isEmpty() { |
| 3192 return this.lastPendingEvent === null; | 3192 return this.lastPendingEvent == null; |
| 3193 } | 3193 } |
| 3194 add(event) { | 3194 add(event) { |
| 3195 if (this.lastPendingEvent === null) { | 3195 if (this.lastPendingEvent == null) { |
| 3196 this.firstPendingEvent = this.lastPendingEvent = event; | 3196 this.firstPendingEvent = this.lastPendingEvent = event; |
| 3197 } else { | 3197 } else { |
| 3198 this.lastPendingEvent = this.lastPendingEvent.next = event; | 3198 this.lastPendingEvent = this.lastPendingEvent.next = event; |
| 3199 } | 3199 } |
| 3200 } | 3200 } |
| 3201 handleNext(dispatch) { | 3201 handleNext(dispatch) { |
| 3202 dart.assert(!dart.notNull(this.isScheduled)); | 3202 dart.assert(!dart.notNull(this.isScheduled)); |
| 3203 let event = this.firstPendingEvent; | 3203 let event = this.firstPendingEvent; |
| 3204 this.firstPendingEvent = event.next; | 3204 this.firstPendingEvent = event.next; |
| 3205 if (this.firstPendingEvent === null) { | 3205 if (this.firstPendingEvent == null) { |
| 3206 this.lastPendingEvent = null; | 3206 this.lastPendingEvent = null; |
| 3207 } | 3207 } |
| 3208 event.perform(dispatch); | 3208 event.perform(dispatch); |
| 3209 } | 3209 } |
| 3210 clear() { | 3210 clear() { |
| 3211 if (this.isScheduled) | 3211 if (this.isScheduled) |
| 3212 this.cancelSchedule(); | 3212 this.cancelSchedule(); |
| 3213 this.firstPendingEvent = this.lastPendingEvent = null; | 3213 this.firstPendingEvent = this.lastPendingEvent = null; |
| 3214 } | 3214 } |
| 3215 } | 3215 } |
| (...skipping 25 matching lines...) Expand all Loading... |
| 3241 let _PAUSED = Symbol('_PAUSED'); | 3241 let _PAUSED = Symbol('_PAUSED'); |
| 3242 let _DoneStreamSubscription$ = dart.generic(function(T) { | 3242 let _DoneStreamSubscription$ = dart.generic(function(T) { |
| 3243 class _DoneStreamSubscription extends core.Object { | 3243 class _DoneStreamSubscription extends core.Object { |
| 3244 _DoneStreamSubscription(onDone$) { | 3244 _DoneStreamSubscription(onDone$) { |
| 3245 this[_onDone] = onDone$; | 3245 this[_onDone] = onDone$; |
| 3246 this[_zone] = Zone.current; | 3246 this[_zone] = Zone.current; |
| 3247 this[_state] = 0; | 3247 this[_state] = 0; |
| 3248 this[_schedule](); | 3248 this[_schedule](); |
| 3249 } | 3249 } |
| 3250 get [_isSent]() { | 3250 get [_isSent]() { |
| 3251 return (dart.notNull(this[_state]) & dart.notNull(_DoneStreamSubscriptio
n[_DONE_SENT])) !== 0; | 3251 return (dart.notNull(this[_state]) & dart.notNull(_DoneStreamSubscriptio
n[_DONE_SENT])) != 0; |
| 3252 } | 3252 } |
| 3253 get [_isScheduled]() { | 3253 get [_isScheduled]() { |
| 3254 return (dart.notNull(this[_state]) & dart.notNull(_DoneStreamSubscriptio
n[_SCHEDULED])) !== 0; | 3254 return (dart.notNull(this[_state]) & dart.notNull(_DoneStreamSubscriptio
n[_SCHEDULED])) != 0; |
| 3255 } | 3255 } |
| 3256 get isPaused() { | 3256 get isPaused() { |
| 3257 return dart.notNull(this[_state]) >= dart.notNull(_DoneStreamSubscriptio
n[_PAUSED]); | 3257 return dart.notNull(this[_state]) >= dart.notNull(_DoneStreamSubscriptio
n[_PAUSED]); |
| 3258 } | 3258 } |
| 3259 [_schedule]() { | 3259 [_schedule]() { |
| 3260 if (this[_isScheduled]) | 3260 if (this[_isScheduled]) |
| 3261 return; | 3261 return; |
| 3262 this[_zone].scheduleMicrotask(this[_sendDone]); | 3262 this[_zone].scheduleMicrotask(this[_sendDone]); |
| 3263 this[_state] = _DoneStreamSubscription[_SCHEDULED]; | 3263 this[_state] = _DoneStreamSubscription[_SCHEDULED]; |
| 3264 } | 3264 } |
| 3265 onData(handleData) {} | 3265 onData(handleData) {} |
| 3266 onError(handleError) {} | 3266 onError(handleError) {} |
| 3267 onDone(handleDone) { | 3267 onDone(handleDone) { |
| 3268 this[_onDone] = handleDone; | 3268 this[_onDone] = handleDone; |
| 3269 } | 3269 } |
| 3270 pause(resumeSignal) { | 3270 pause(resumeSignal) { |
| 3271 if (resumeSignal === void 0) | 3271 if (resumeSignal === void 0) |
| 3272 resumeSignal = null; | 3272 resumeSignal = null; |
| 3273 this[_state] = _DoneStreamSubscription[_PAUSED]; | 3273 this[_state] = _DoneStreamSubscription[_PAUSED]; |
| 3274 if (resumeSignal !== null) | 3274 if (resumeSignal != null) |
| 3275 resumeSignal.whenComplete(this.resume); | 3275 resumeSignal.whenComplete(this.resume); |
| 3276 } | 3276 } |
| 3277 resume() { | 3277 resume() { |
| 3278 if (this.isPaused) { | 3278 if (this.isPaused) { |
| 3279 this[_state] = _DoneStreamSubscription[_PAUSED]; | 3279 this[_state] = _DoneStreamSubscription[_PAUSED]; |
| 3280 if (!dart.notNull(this.isPaused) && !dart.notNull(this[_isSent])) { | 3280 if (!dart.notNull(this.isPaused) && !dart.notNull(this[_isSent])) { |
| 3281 this[_schedule](); | 3281 this[_schedule](); |
| 3282 } | 3282 } |
| 3283 } | 3283 } |
| 3284 } | 3284 } |
| 3285 cancel() { | 3285 cancel() { |
| 3286 return null; | 3286 return null; |
| 3287 } | 3287 } |
| 3288 asFuture(futureValue) { | 3288 asFuture(futureValue) { |
| 3289 if (futureValue === void 0) | 3289 if (futureValue === void 0) |
| 3290 futureValue = null; | 3290 futureValue = null; |
| 3291 let result = new _Future(); | 3291 let result = new _Future(); |
| 3292 this[_onDone] = (() => { | 3292 this[_onDone] = (() => { |
| 3293 result._completeWithValue(null); | 3293 result._completeWithValue(null); |
| 3294 }).bind(this); | 3294 }).bind(this); |
| 3295 return result; | 3295 return result; |
| 3296 } | 3296 } |
| 3297 [_sendDone]() { | 3297 [_sendDone]() { |
| 3298 this[_state] = ~dart.notNull(_DoneStreamSubscription[_SCHEDULED]); | 3298 this[_state] = ~dart.notNull(_DoneStreamSubscription[_SCHEDULED]); |
| 3299 if (this.isPaused) | 3299 if (this.isPaused) |
| 3300 return; | 3300 return; |
| 3301 this[_state] = _DoneStreamSubscription[_DONE_SENT]; | 3301 this[_state] = _DoneStreamSubscription[_DONE_SENT]; |
| 3302 if (this[_onDone] !== null) | 3302 if (this[_onDone] != null) |
| 3303 this[_zone].runGuarded(this[_onDone]); | 3303 this[_zone].runGuarded(this[_onDone]); |
| 3304 } | 3304 } |
| 3305 } | 3305 } |
| 3306 _DoneStreamSubscription._DONE_SENT = 1; | 3306 _DoneStreamSubscription._DONE_SENT = 1; |
| 3307 _DoneStreamSubscription._SCHEDULED = 2; | 3307 _DoneStreamSubscription._SCHEDULED = 2; |
| 3308 _DoneStreamSubscription._PAUSED = 4; | 3308 _DoneStreamSubscription._PAUSED = 4; |
| 3309 return _DoneStreamSubscription; | 3309 return _DoneStreamSubscription; |
| 3310 }); | 3310 }); |
| 3311 let _DoneStreamSubscription = _DoneStreamSubscription$(dart.dynamic); | 3311 let _DoneStreamSubscription = _DoneStreamSubscription$(dart.dynamic); |
| 3312 let _source = Symbol('_source'); | 3312 let _source = Symbol('_source'); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 3328 super.Stream(); | 3328 super.Stream(); |
| 3329 this[_controller] = new _AsBroadcastStreamController(this[_onListen], th
is[_onCancel]); | 3329 this[_controller] = new _AsBroadcastStreamController(this[_onListen], th
is[_onCancel]); |
| 3330 } | 3330 } |
| 3331 get isBroadcast() { | 3331 get isBroadcast() { |
| 3332 return true; | 3332 return true; |
| 3333 } | 3333 } |
| 3334 listen(onData, opts) { | 3334 listen(onData, opts) { |
| 3335 let onError = opts && 'onError' in opts ? opts.onError : null; | 3335 let onError = opts && 'onError' in opts ? opts.onError : null; |
| 3336 let onDone = opts && 'onDone' in opts ? opts.onDone : null; | 3336 let onDone = opts && 'onDone' in opts ? opts.onDone : null; |
| 3337 let cancelOnError = opts && 'cancelOnError' in opts ? opts.cancelOnError
: null; | 3337 let cancelOnError = opts && 'cancelOnError' in opts ? opts.cancelOnError
: null; |
| 3338 if (dart.notNull(this[_controller] === null) || dart.notNull(this[_contr
oller].isClosed)) { | 3338 if (dart.notNull(this[_controller] == null) || dart.notNull(this[_contro
ller].isClosed)) { |
| 3339 return new _DoneStreamSubscription(onDone); | 3339 return new _DoneStreamSubscription(onDone); |
| 3340 } | 3340 } |
| 3341 if (this[_subscription] === null) { | 3341 if (this[_subscription] == null) { |
| 3342 this[_subscription] = this[_source].listen(this[_controller].add, {onE
rror: this[_controller].addError, onDone: this[_controller].close}); | 3342 this[_subscription] = this[_source].listen(this[_controller].add, {onE
rror: this[_controller].addError, onDone: this[_controller].close}); |
| 3343 } | 3343 } |
| 3344 cancelOnError = core.identical(true, cancelOnError); | 3344 cancelOnError = core.identical(true, cancelOnError); |
| 3345 return this[_controller]._subscribe(onData, onError, onDone, cancelOnErr
or); | 3345 return this[_controller]._subscribe(onData, onError, onDone, cancelOnErr
or); |
| 3346 } | 3346 } |
| 3347 [_onCancel]() { | 3347 [_onCancel]() { |
| 3348 let shutdown = dart.notNull(this[_controller] === null) || dart.notNull(
this[_controller].isClosed); | 3348 let shutdown = dart.notNull(this[_controller] == null) || dart.notNull(t
his[_controller].isClosed); |
| 3349 if (this[_onCancelHandler] !== null) { | 3349 if (this[_onCancelHandler] != null) { |
| 3350 this[_zone].runUnary(this[_onCancelHandler], new _BroadcastSubscriptio
nWrapper(this)); | 3350 this[_zone].runUnary(this[_onCancelHandler], new _BroadcastSubscriptio
nWrapper(this)); |
| 3351 } | 3351 } |
| 3352 if (shutdown) { | 3352 if (shutdown) { |
| 3353 if (this[_subscription] !== null) { | 3353 if (this[_subscription] != null) { |
| 3354 this[_subscription].cancel(); | 3354 this[_subscription].cancel(); |
| 3355 this[_subscription] = null; | 3355 this[_subscription] = null; |
| 3356 } | 3356 } |
| 3357 } | 3357 } |
| 3358 } | 3358 } |
| 3359 [_onListen]() { | 3359 [_onListen]() { |
| 3360 if (this[_onListenHandler] !== null) { | 3360 if (this[_onListenHandler] != null) { |
| 3361 this[_zone].runUnary(this[_onListenHandler], new _BroadcastSubscriptio
nWrapper(this)); | 3361 this[_zone].runUnary(this[_onListenHandler], new _BroadcastSubscriptio
nWrapper(this)); |
| 3362 } | 3362 } |
| 3363 } | 3363 } |
| 3364 [_cancelSubscription]() { | 3364 [_cancelSubscription]() { |
| 3365 if (this[_subscription] === null) | 3365 if (this[_subscription] == null) |
| 3366 return; | 3366 return; |
| 3367 let subscription = this[_subscription]; | 3367 let subscription = this[_subscription]; |
| 3368 this[_subscription] = null; | 3368 this[_subscription] = null; |
| 3369 this[_controller] = null; | 3369 this[_controller] = null; |
| 3370 subscription.cancel(); | 3370 subscription.cancel(); |
| 3371 } | 3371 } |
| 3372 [_pauseSubscription](resumeSignal) { | 3372 [_pauseSubscription](resumeSignal) { |
| 3373 if (this[_subscription] === null) | 3373 if (this[_subscription] == null) |
| 3374 return; | 3374 return; |
| 3375 this[_subscription].pause(resumeSignal); | 3375 this[_subscription].pause(resumeSignal); |
| 3376 } | 3376 } |
| 3377 [_resumeSubscription]() { | 3377 [_resumeSubscription]() { |
| 3378 if (this[_subscription] === null) | 3378 if (this[_subscription] == null) |
| 3379 return; | 3379 return; |
| 3380 this[_subscription].resume(); | 3380 this[_subscription].resume(); |
| 3381 } | 3381 } |
| 3382 get [_isSubscriptionPaused]() { | 3382 get [_isSubscriptionPaused]() { |
| 3383 if (this[_subscription] === null) | 3383 if (this[_subscription] == null) |
| 3384 return false; | 3384 return false; |
| 3385 return this[_subscription].isPaused; | 3385 return this[_subscription].isPaused; |
| 3386 } | 3386 } |
| 3387 } | 3387 } |
| 3388 return _AsBroadcastStream; | 3388 return _AsBroadcastStream; |
| 3389 }); | 3389 }); |
| 3390 let _AsBroadcastStream = _AsBroadcastStream$(dart.dynamic); | 3390 let _AsBroadcastStream = _AsBroadcastStream$(dart.dynamic); |
| 3391 let _BroadcastSubscriptionWrapper$ = dart.generic(function(T) { | 3391 let _BroadcastSubscriptionWrapper$ = dart.generic(function(T) { |
| 3392 class _BroadcastSubscriptionWrapper extends core.Object { | 3392 class _BroadcastSubscriptionWrapper extends core.Object { |
| 3393 _BroadcastSubscriptionWrapper(stream$) { | 3393 _BroadcastSubscriptionWrapper(stream$) { |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3441 this[_subscription] = null; | 3441 this[_subscription] = null; |
| 3442 this[_current] = null; | 3442 this[_current] = null; |
| 3443 this[_futureOrPrefetch] = null; | 3443 this[_futureOrPrefetch] = null; |
| 3444 this[_state] = _StreamIteratorImpl[_STATE_FOUND]; | 3444 this[_state] = _StreamIteratorImpl[_STATE_FOUND]; |
| 3445 this[_subscription] = stream.listen(this[_onData], {onError: this[_onErr
or], onDone: this[_onDone], cancelOnError: true}); | 3445 this[_subscription] = stream.listen(this[_onData], {onError: this[_onErr
or], onDone: this[_onDone], cancelOnError: true}); |
| 3446 } | 3446 } |
| 3447 get current() { | 3447 get current() { |
| 3448 return this[_current]; | 3448 return this[_current]; |
| 3449 } | 3449 } |
| 3450 moveNext() { | 3450 moveNext() { |
| 3451 if (this[_state] === _StreamIteratorImpl[_STATE_DONE]) { | 3451 if (this[_state] == _StreamIteratorImpl[_STATE_DONE]) { |
| 3452 return new _Future.immediate(false); | 3452 return new _Future.immediate(false); |
| 3453 } | 3453 } |
| 3454 if (this[_state] === _StreamIteratorImpl[_STATE_MOVING]) { | 3454 if (this[_state] == _StreamIteratorImpl[_STATE_MOVING]) { |
| 3455 throw new core.StateError("Already waiting for next."); | 3455 throw new core.StateError("Already waiting for next."); |
| 3456 } | 3456 } |
| 3457 if (this[_state] === _StreamIteratorImpl[_STATE_FOUND]) { | 3457 if (this[_state] == _StreamIteratorImpl[_STATE_FOUND]) { |
| 3458 this[_state] = _StreamIteratorImpl[_STATE_MOVING]; | 3458 this[_state] = _StreamIteratorImpl[_STATE_MOVING]; |
| 3459 this[_current] = null; | 3459 this[_current] = null; |
| 3460 this[_futureOrPrefetch] = new _Future(); | 3460 this[_futureOrPrefetch] = new _Future(); |
| 3461 return dart.as(this[_futureOrPrefetch], Future$(core.bool)); | 3461 return dart.as(this[_futureOrPrefetch], Future$(core.bool)); |
| 3462 } else { | 3462 } else { |
| 3463 dart.assert(dart.notNull(this[_state]) >= dart.notNull(_StreamIterator
Impl[_STATE_EXTRA_DATA])); | 3463 dart.assert(dart.notNull(this[_state]) >= dart.notNull(_StreamIterator
Impl[_STATE_EXTRA_DATA])); |
| 3464 switch (this[_state]) { | 3464 switch (this[_state]) { |
| 3465 case _StreamIteratorImpl[_STATE_EXTRA_DATA]: | 3465 case _StreamIteratorImpl[_STATE_EXTRA_DATA]: |
| 3466 { | 3466 { |
| 3467 this[_state] = _StreamIteratorImpl[_STATE_FOUND]; | 3467 this[_state] = _StreamIteratorImpl[_STATE_FOUND]; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 3485 } | 3485 } |
| 3486 } | 3486 } |
| 3487 [_clear]() { | 3487 [_clear]() { |
| 3488 this[_subscription] = null; | 3488 this[_subscription] = null; |
| 3489 this[_futureOrPrefetch] = null; | 3489 this[_futureOrPrefetch] = null; |
| 3490 this[_current] = null; | 3490 this[_current] = null; |
| 3491 this[_state] = _StreamIteratorImpl[_STATE_DONE]; | 3491 this[_state] = _StreamIteratorImpl[_STATE_DONE]; |
| 3492 } | 3492 } |
| 3493 cancel() { | 3493 cancel() { |
| 3494 let subscription = this[_subscription]; | 3494 let subscription = this[_subscription]; |
| 3495 if (this[_state] === _StreamIteratorImpl[_STATE_MOVING]) { | 3495 if (this[_state] == _StreamIteratorImpl[_STATE_MOVING]) { |
| 3496 let hasNext = dart.as(this[_futureOrPrefetch], _Future$(core.bool)); | 3496 let hasNext = dart.as(this[_futureOrPrefetch], _Future$(core.bool)); |
| 3497 this[_clear](); | 3497 this[_clear](); |
| 3498 hasNext._complete(false); | 3498 hasNext._complete(false); |
| 3499 } else { | 3499 } else { |
| 3500 this[_clear](); | 3500 this[_clear](); |
| 3501 } | 3501 } |
| 3502 return subscription.cancel(); | 3502 return subscription.cancel(); |
| 3503 } | 3503 } |
| 3504 [_onData](data) { | 3504 [_onData](data) { |
| 3505 if (this[_state] === _StreamIteratorImpl[_STATE_MOVING]) { | 3505 if (this[_state] == _StreamIteratorImpl[_STATE_MOVING]) { |
| 3506 this[_current] = data; | 3506 this[_current] = data; |
| 3507 let hasNext = dart.as(this[_futureOrPrefetch], _Future$(core.bool)); | 3507 let hasNext = dart.as(this[_futureOrPrefetch], _Future$(core.bool)); |
| 3508 this[_futureOrPrefetch] = null; | 3508 this[_futureOrPrefetch] = null; |
| 3509 this[_state] = _StreamIteratorImpl[_STATE_FOUND]; | 3509 this[_state] = _StreamIteratorImpl[_STATE_FOUND]; |
| 3510 hasNext._complete(true); | 3510 hasNext._complete(true); |
| 3511 return; | 3511 return; |
| 3512 } | 3512 } |
| 3513 this[_subscription].pause(); | 3513 this[_subscription].pause(); |
| 3514 dart.assert(this[_futureOrPrefetch] === null); | 3514 dart.assert(this[_futureOrPrefetch] == null); |
| 3515 this[_futureOrPrefetch] = data; | 3515 this[_futureOrPrefetch] = data; |
| 3516 this[_state] = _StreamIteratorImpl[_STATE_EXTRA_DATA]; | 3516 this[_state] = _StreamIteratorImpl[_STATE_EXTRA_DATA]; |
| 3517 } | 3517 } |
| 3518 [_onError](error, stackTrace) { | 3518 [_onError](error, stackTrace) { |
| 3519 if (stackTrace === void 0) | 3519 if (stackTrace === void 0) |
| 3520 stackTrace = null; | 3520 stackTrace = null; |
| 3521 if (this[_state] === _StreamIteratorImpl[_STATE_MOVING]) { | 3521 if (this[_state] == _StreamIteratorImpl[_STATE_MOVING]) { |
| 3522 let hasNext = dart.as(this[_futureOrPrefetch], _Future$(core.bool)); | 3522 let hasNext = dart.as(this[_futureOrPrefetch], _Future$(core.bool)); |
| 3523 this[_clear](); | 3523 this[_clear](); |
| 3524 hasNext._completeError(error, stackTrace); | 3524 hasNext._completeError(error, stackTrace); |
| 3525 return; | 3525 return; |
| 3526 } | 3526 } |
| 3527 this[_subscription].pause(); | 3527 this[_subscription].pause(); |
| 3528 dart.assert(this[_futureOrPrefetch] === null); | 3528 dart.assert(this[_futureOrPrefetch] == null); |
| 3529 this[_futureOrPrefetch] = new AsyncError(error, stackTrace); | 3529 this[_futureOrPrefetch] = new AsyncError(error, stackTrace); |
| 3530 this[_state] = _StreamIteratorImpl[_STATE_EXTRA_ERROR]; | 3530 this[_state] = _StreamIteratorImpl[_STATE_EXTRA_ERROR]; |
| 3531 } | 3531 } |
| 3532 [_onDone]() { | 3532 [_onDone]() { |
| 3533 if (this[_state] === _StreamIteratorImpl[_STATE_MOVING]) { | 3533 if (this[_state] == _StreamIteratorImpl[_STATE_MOVING]) { |
| 3534 let hasNext = dart.as(this[_futureOrPrefetch], _Future$(core.bool)); | 3534 let hasNext = dart.as(this[_futureOrPrefetch], _Future$(core.bool)); |
| 3535 this[_clear](); | 3535 this[_clear](); |
| 3536 hasNext._complete(false); | 3536 hasNext._complete(false); |
| 3537 return; | 3537 return; |
| 3538 } | 3538 } |
| 3539 this[_subscription].pause(); | 3539 this[_subscription].pause(); |
| 3540 this[_futureOrPrefetch] = null; | 3540 this[_futureOrPrefetch] = null; |
| 3541 this[_state] = _StreamIteratorImpl[_STATE_EXTRA_DONE]; | 3541 this[_state] = _StreamIteratorImpl[_STATE_EXTRA_DONE]; |
| 3542 } | 3542 } |
| 3543 } | 3543 } |
| 3544 _StreamIteratorImpl._STATE_FOUND = 0; | 3544 _StreamIteratorImpl._STATE_FOUND = 0; |
| 3545 _StreamIteratorImpl._STATE_DONE = 1; | 3545 _StreamIteratorImpl._STATE_DONE = 1; |
| 3546 _StreamIteratorImpl._STATE_MOVING = 2; | 3546 _StreamIteratorImpl._STATE_MOVING = 2; |
| 3547 _StreamIteratorImpl._STATE_EXTRA_DATA = 3; | 3547 _StreamIteratorImpl._STATE_EXTRA_DATA = 3; |
| 3548 _StreamIteratorImpl._STATE_EXTRA_ERROR = 4; | 3548 _StreamIteratorImpl._STATE_EXTRA_ERROR = 4; |
| 3549 _StreamIteratorImpl._STATE_EXTRA_DONE = 5; | 3549 _StreamIteratorImpl._STATE_EXTRA_DONE = 5; |
| 3550 return _StreamIteratorImpl; | 3550 return _StreamIteratorImpl; |
| 3551 }); | 3551 }); |
| 3552 let _StreamIteratorImpl = _StreamIteratorImpl$(dart.dynamic); | 3552 let _StreamIteratorImpl = _StreamIteratorImpl$(dart.dynamic); |
| 3553 // Function _runUserCode: (() → dynamic, (dynamic) → dynamic, (dynamic, StackT
race) → dynamic) → dynamic | 3553 // Function _runUserCode: (() → dynamic, (dynamic) → dynamic, (dynamic, StackT
race) → dynamic) → dynamic |
| 3554 function _runUserCode(userCode, onSuccess, onError) { | 3554 function _runUserCode(userCode, onSuccess, onError) { |
| 3555 try { | 3555 try { |
| 3556 dart.dinvokef(onSuccess, userCode()); | 3556 dart.dinvokef(onSuccess, userCode()); |
| 3557 } catch (e) { | 3557 } catch (e) { |
| 3558 let s = dart.stackTrace(e); | 3558 let s = dart.stackTrace(e); |
| 3559 let replacement = Zone.current.errorCallback(e, s); | 3559 let replacement = Zone.current.errorCallback(e, s); |
| 3560 if (replacement === null) { | 3560 if (replacement == null) { |
| 3561 dart.dinvokef(onError, e, s); | 3561 dart.dinvokef(onError, e, s); |
| 3562 } else { | 3562 } else { |
| 3563 let error = _nonNullError(replacement.error); | 3563 let error = _nonNullError(replacement.error); |
| 3564 let stackTrace = replacement.stackTrace; | 3564 let stackTrace = replacement.stackTrace; |
| 3565 dart.dinvokef(onError, error, stackTrace); | 3565 dart.dinvokef(onError, error, stackTrace); |
| 3566 } | 3566 } |
| 3567 } | 3567 } |
| 3568 | 3568 |
| 3569 } | 3569 } |
| 3570 // Function _cancelAndError: (StreamSubscription<dynamic>, _Future<dynamic>, d
ynamic, StackTrace) → void | 3570 // Function _cancelAndError: (StreamSubscription<dynamic>, _Future<dynamic>, d
ynamic, StackTrace) → void |
| 3571 function _cancelAndError(subscription, future, error, stackTrace) { | 3571 function _cancelAndError(subscription, future, error, stackTrace) { |
| 3572 let cancelFuture = subscription.cancel(); | 3572 let cancelFuture = subscription.cancel(); |
| 3573 if (dart.is(cancelFuture, Future)) { | 3573 if (dart.is(cancelFuture, Future)) { |
| 3574 cancelFuture.whenComplete(() => future._completeError(error, stackTrace)); | 3574 cancelFuture.whenComplete(() => future._completeError(error, stackTrace)); |
| 3575 } else { | 3575 } else { |
| 3576 future._completeError(error, stackTrace); | 3576 future._completeError(error, stackTrace); |
| 3577 } | 3577 } |
| 3578 } | 3578 } |
| 3579 // Function _cancelAndErrorWithReplacement: (StreamSubscription<dynamic>, _Fut
ure<dynamic>, dynamic, StackTrace) → void | 3579 // Function _cancelAndErrorWithReplacement: (StreamSubscription<dynamic>, _Fut
ure<dynamic>, dynamic, StackTrace) → void |
| 3580 function _cancelAndErrorWithReplacement(subscription, future, error, stackTrac
e) { | 3580 function _cancelAndErrorWithReplacement(subscription, future, error, stackTrac
e) { |
| 3581 let replacement = Zone.current.errorCallback(error, stackTrace); | 3581 let replacement = Zone.current.errorCallback(error, stackTrace); |
| 3582 if (replacement !== null) { | 3582 if (replacement != null) { |
| 3583 error = _nonNullError(replacement.error); | 3583 error = _nonNullError(replacement.error); |
| 3584 stackTrace = replacement.stackTrace; | 3584 stackTrace = replacement.stackTrace; |
| 3585 } | 3585 } |
| 3586 _cancelAndError(subscription, future, error, stackTrace); | 3586 _cancelAndError(subscription, future, error, stackTrace); |
| 3587 } | 3587 } |
| 3588 // Function _cancelAndErrorClosure: (StreamSubscription<dynamic>, _Future<dyna
mic>) → dynamic | 3588 // Function _cancelAndErrorClosure: (StreamSubscription<dynamic>, _Future<dyna
mic>) → dynamic |
| 3589 function _cancelAndErrorClosure(subscription, future) { | 3589 function _cancelAndErrorClosure(subscription, future) { |
| 3590 return (error, stackTrace) => _cancelAndError(subscription, future, error, s
tackTrace); | 3590 return (error, stackTrace) => _cancelAndError(subscription, future, error, s
tackTrace); |
| 3591 } | 3591 } |
| 3592 // Function _cancelAndValue: (StreamSubscription<dynamic>, _Future<dynamic>, d
ynamic) → void | 3592 // Function _cancelAndValue: (StreamSubscription<dynamic>, _Future<dynamic>, d
ynamic) → void |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3646 if (this[_isClosed]) | 3646 if (this[_isClosed]) |
| 3647 return; | 3647 return; |
| 3648 super._add(data); | 3648 super._add(data); |
| 3649 } | 3649 } |
| 3650 [_addError](error, stackTrace) { | 3650 [_addError](error, stackTrace) { |
| 3651 if (this[_isClosed]) | 3651 if (this[_isClosed]) |
| 3652 return; | 3652 return; |
| 3653 super._addError(error, stackTrace); | 3653 super._addError(error, stackTrace); |
| 3654 } | 3654 } |
| 3655 [_onPause]() { | 3655 [_onPause]() { |
| 3656 if (this[_subscription] === null) | 3656 if (this[_subscription] == null) |
| 3657 return; | 3657 return; |
| 3658 this[_subscription].pause(); | 3658 this[_subscription].pause(); |
| 3659 } | 3659 } |
| 3660 [_onResume]() { | 3660 [_onResume]() { |
| 3661 if (this[_subscription] === null) | 3661 if (this[_subscription] == null) |
| 3662 return; | 3662 return; |
| 3663 this[_subscription].resume(); | 3663 this[_subscription].resume(); |
| 3664 } | 3664 } |
| 3665 [_onCancel]() { | 3665 [_onCancel]() { |
| 3666 if (this[_subscription] !== null) { | 3666 if (this[_subscription] != null) { |
| 3667 let subscription = this[_subscription]; | 3667 let subscription = this[_subscription]; |
| 3668 this[_subscription] = null; | 3668 this[_subscription] = null; |
| 3669 subscription.cancel(); | 3669 subscription.cancel(); |
| 3670 } | 3670 } |
| 3671 return null; | 3671 return null; |
| 3672 } | 3672 } |
| 3673 [_handleData](data) { | 3673 [_handleData](data) { |
| 3674 this[_stream]._handleData(data, this); | 3674 this[_stream]._handleData(data, this); |
| 3675 } | 3675 } |
| 3676 [_handleError](error, stackTrace) { | 3676 [_handleError](error, stackTrace) { |
| 3677 this[_stream]._handleError(error, stackTrace, this); | 3677 this[_stream]._handleError(error, stackTrace, this); |
| 3678 } | 3678 } |
| 3679 [_handleDone]() { | 3679 [_handleDone]() { |
| 3680 this[_stream]._handleDone(this); | 3680 this[_stream]._handleDone(this); |
| 3681 } | 3681 } |
| 3682 } | 3682 } |
| 3683 return _ForwardingStreamSubscription; | 3683 return _ForwardingStreamSubscription; |
| 3684 }); | 3684 }); |
| 3685 let _ForwardingStreamSubscription = _ForwardingStreamSubscription$(dart.dynami
c, dart.dynamic); | 3685 let _ForwardingStreamSubscription = _ForwardingStreamSubscription$(dart.dynami
c, dart.dynamic); |
| 3686 // Function _addErrorWithReplacement: (_EventSink<dynamic>, dynamic, dynamic)
→ void | 3686 // Function _addErrorWithReplacement: (_EventSink<dynamic>, dynamic, dynamic)
→ void |
| 3687 function _addErrorWithReplacement(sink, error, stackTrace) { | 3687 function _addErrorWithReplacement(sink, error, stackTrace) { |
| 3688 let replacement = Zone.current.errorCallback(error, dart.as(stackTrace, core
.StackTrace)); | 3688 let replacement = Zone.current.errorCallback(error, dart.as(stackTrace, core
.StackTrace)); |
| 3689 if (replacement !== null) { | 3689 if (replacement != null) { |
| 3690 error = _nonNullError(replacement.error); | 3690 error = _nonNullError(replacement.error); |
| 3691 stackTrace = replacement.stackTrace; | 3691 stackTrace = replacement.stackTrace; |
| 3692 } | 3692 } |
| 3693 sink._addError(error, dart.as(stackTrace, core.StackTrace)); | 3693 sink._addError(error, dart.as(stackTrace, core.StackTrace)); |
| 3694 } | 3694 } |
| 3695 let _test = Symbol('_test'); | 3695 let _test = Symbol('_test'); |
| 3696 let _WhereStream$ = dart.generic(function(T) { | 3696 let _WhereStream$ = dart.generic(function(T) { |
| 3697 class _WhereStream extends _ForwardingStream$(T, T) { | 3697 class _WhereStream extends _ForwardingStream$(T, T) { |
| 3698 _WhereStream(source, test) { | 3698 _WhereStream(source, test) { |
| 3699 this[_test] = test; | 3699 this[_test] = test; |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3764 let _ExpandStream = _ExpandStream$(dart.dynamic, dart.dynamic); | 3764 let _ExpandStream = _ExpandStream$(dart.dynamic, dart.dynamic); |
| 3765 let _HandleErrorStream$ = dart.generic(function(T) { | 3765 let _HandleErrorStream$ = dart.generic(function(T) { |
| 3766 class _HandleErrorStream extends _ForwardingStream$(T, T) { | 3766 class _HandleErrorStream extends _ForwardingStream$(T, T) { |
| 3767 _HandleErrorStream(source, onError, test) { | 3767 _HandleErrorStream(source, onError, test) { |
| 3768 this[_transform] = onError; | 3768 this[_transform] = onError; |
| 3769 this[_test] = test; | 3769 this[_test] = test; |
| 3770 super._ForwardingStream(source); | 3770 super._ForwardingStream(source); |
| 3771 } | 3771 } |
| 3772 [_handleError](error, stackTrace, sink) { | 3772 [_handleError](error, stackTrace, sink) { |
| 3773 let matches = true; | 3773 let matches = true; |
| 3774 if (this[_test] !== null) { | 3774 if (this[_test] != null) { |
| 3775 try { | 3775 try { |
| 3776 matches = dart.dinvokef(this[_test], error); | 3776 matches = dart.dinvokef(this[_test], error); |
| 3777 } catch (e) { | 3777 } catch (e) { |
| 3778 let s = dart.stackTrace(e); | 3778 let s = dart.stackTrace(e); |
| 3779 _addErrorWithReplacement(sink, e, s); | 3779 _addErrorWithReplacement(sink, e, s); |
| 3780 return; | 3780 return; |
| 3781 } | 3781 } |
| 3782 | 3782 |
| 3783 } | 3783 } |
| 3784 if (matches) { | 3784 if (matches) { |
| (...skipping 23 matching lines...) Expand all Loading... |
| 3808 _TakeStream(source, count) { | 3808 _TakeStream(source, count) { |
| 3809 this[_remaining] = count; | 3809 this[_remaining] = count; |
| 3810 super._ForwardingStream(source); | 3810 super._ForwardingStream(source); |
| 3811 if (!(typeof count == 'number')) | 3811 if (!(typeof count == 'number')) |
| 3812 throw new core.ArgumentError(count); | 3812 throw new core.ArgumentError(count); |
| 3813 } | 3813 } |
| 3814 [_handleData](inputEvent, sink) { | 3814 [_handleData](inputEvent, sink) { |
| 3815 if (dart.notNull(this[_remaining]) > 0) { | 3815 if (dart.notNull(this[_remaining]) > 0) { |
| 3816 sink._add(inputEvent); | 3816 sink._add(inputEvent); |
| 3817 this[_remaining] = 1; | 3817 this[_remaining] = 1; |
| 3818 if (this[_remaining] === 0) { | 3818 if (this[_remaining] == 0) { |
| 3819 sink._close(); | 3819 sink._close(); |
| 3820 } | 3820 } |
| 3821 } | 3821 } |
| 3822 } | 3822 } |
| 3823 } | 3823 } |
| 3824 return _TakeStream; | 3824 return _TakeStream; |
| 3825 }); | 3825 }); |
| 3826 let _TakeStream = _TakeStream$(dart.dynamic); | 3826 let _TakeStream = _TakeStream$(dart.dynamic); |
| 3827 let _TakeWhileStream$ = dart.generic(function(T) { | 3827 let _TakeWhileStream$ = dart.generic(function(T) { |
| 3828 class _TakeWhileStream extends _ForwardingStream$(T, T) { | 3828 class _TakeWhileStream extends _ForwardingStream$(T, T) { |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3911 this[_equals] = equals; | 3911 this[_equals] = equals; |
| 3912 super._ForwardingStream(source); | 3912 super._ForwardingStream(source); |
| 3913 } | 3913 } |
| 3914 [_handleData](inputEvent, sink) { | 3914 [_handleData](inputEvent, sink) { |
| 3915 if (core.identical(this[_previous], _DistinctStream[_SENTINEL])) { | 3915 if (core.identical(this[_previous], _DistinctStream[_SENTINEL])) { |
| 3916 this[_previous] = inputEvent; | 3916 this[_previous] = inputEvent; |
| 3917 return sink._add(inputEvent); | 3917 return sink._add(inputEvent); |
| 3918 } else { | 3918 } else { |
| 3919 let isEqual = null; | 3919 let isEqual = null; |
| 3920 try { | 3920 try { |
| 3921 if (this[_equals] === null) { | 3921 if (this[_equals] == null) { |
| 3922 isEqual = dart.equals(this[_previous], inputEvent); | 3922 isEqual = dart.equals(this[_previous], inputEvent); |
| 3923 } else { | 3923 } else { |
| 3924 isEqual = this[_equals](dart.as(this[_previous], T), inputEvent); | 3924 isEqual = this[_equals](dart.as(this[_previous], T), inputEvent); |
| 3925 } | 3925 } |
| 3926 } catch (e) { | 3926 } catch (e) { |
| 3927 let s = dart.stackTrace(e); | 3927 let s = dart.stackTrace(e); |
| 3928 _addErrorWithReplacement(sink, e, s); | 3928 _addErrorWithReplacement(sink, e, s); |
| 3929 return null; | 3929 return null; |
| 3930 } | 3930 } |
| 3931 | 3931 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3971 class _SinkTransformerStreamSubscription extends _BufferingStreamSubscriptio
n$(T) { | 3971 class _SinkTransformerStreamSubscription extends _BufferingStreamSubscriptio
n$(T) { |
| 3972 _SinkTransformerStreamSubscription(source, mapper, onData, onError, onDone
, cancelOnError) { | 3972 _SinkTransformerStreamSubscription(source, mapper, onData, onError, onDone
, cancelOnError) { |
| 3973 this[_transformerSink] = null; | 3973 this[_transformerSink] = null; |
| 3974 this[_subscription] = null; | 3974 this[_subscription] = null; |
| 3975 super._BufferingStreamSubscription(onData, onError, onDone, cancelOnErro
r); | 3975 super._BufferingStreamSubscription(onData, onError, onDone, cancelOnErro
r); |
| 3976 let eventSink = new _EventSinkWrapper(this); | 3976 let eventSink = new _EventSinkWrapper(this); |
| 3977 this[_transformerSink] = mapper(eventSink); | 3977 this[_transformerSink] = mapper(eventSink); |
| 3978 this[_subscription] = source.listen(this[_handleData], {onError: this[_h
andleError], onDone: this[_handleDone]}); | 3978 this[_subscription] = source.listen(this[_handleData], {onError: this[_h
andleError], onDone: this[_handleDone]}); |
| 3979 } | 3979 } |
| 3980 get [_isSubscribed]() { | 3980 get [_isSubscribed]() { |
| 3981 return this[_subscription] !== null; | 3981 return this[_subscription] != null; |
| 3982 } | 3982 } |
| 3983 [_add](data) { | 3983 [_add](data) { |
| 3984 if (this[_isClosed]) { | 3984 if (this[_isClosed]) { |
| 3985 throw new core.StateError("Stream is already closed"); | 3985 throw new core.StateError("Stream is already closed"); |
| 3986 } | 3986 } |
| 3987 super._add(data); | 3987 super._add(data); |
| 3988 } | 3988 } |
| 3989 [_addError](error, stackTrace) { | 3989 [_addError](error, stackTrace) { |
| 3990 if (this[_isClosed]) { | 3990 if (this[_isClosed]) { |
| 3991 throw new core.StateError("Stream is already closed"); | 3991 throw new core.StateError("Stream is already closed"); |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4113 let _defaultHandleData = Symbol('_defaultHandleData'); | 4113 let _defaultHandleData = Symbol('_defaultHandleData'); |
| 4114 let _defaultHandleError = Symbol('_defaultHandleError'); | 4114 let _defaultHandleError = Symbol('_defaultHandleError'); |
| 4115 let _defaultHandleDone = Symbol('_defaultHandleDone'); | 4115 let _defaultHandleDone = Symbol('_defaultHandleDone'); |
| 4116 let _StreamHandlerTransformer$ = dart.generic(function(S, T) { | 4116 let _StreamHandlerTransformer$ = dart.generic(function(S, T) { |
| 4117 class _StreamHandlerTransformer extends _StreamSinkTransformer$(S, T) { | 4117 class _StreamHandlerTransformer extends _StreamSinkTransformer$(S, T) { |
| 4118 _StreamHandlerTransformer(opts) { | 4118 _StreamHandlerTransformer(opts) { |
| 4119 let handleData = opts && 'handleData' in opts ? opts.handleData : null; | 4119 let handleData = opts && 'handleData' in opts ? opts.handleData : null; |
| 4120 let handleError = opts && 'handleError' in opts ? opts.handleError : nul
l; | 4120 let handleError = opts && 'handleError' in opts ? opts.handleError : nul
l; |
| 4121 let handleDone = opts && 'handleDone' in opts ? opts.handleDone : null; | 4121 let handleDone = opts && 'handleDone' in opts ? opts.handleDone : null; |
| 4122 super._StreamSinkTransformer(dart.closureWrap((outputSink) => { | 4122 super._StreamSinkTransformer(dart.closureWrap((outputSink) => { |
| 4123 if (handleData === null) | 4123 if (handleData == null) |
| 4124 handleData = dart.closureWrap(_StreamHandlerTransformer[_defaultHand
leData], "(S, EventSink<T>) → void"); | 4124 handleData = dart.closureWrap(_StreamHandlerTransformer[_defaultHand
leData], "(S, EventSink<T>) → void"); |
| 4125 if (handleError === null) | 4125 if (handleError == null) |
| 4126 handleError = dart.closureWrap(_StreamHandlerTransformer[_defaultHan
dleError], "(Object, StackTrace, EventSink<T>) → void"); | 4126 handleError = dart.closureWrap(_StreamHandlerTransformer[_defaultHan
dleError], "(Object, StackTrace, EventSink<T>) → void"); |
| 4127 if (handleDone === null) | 4127 if (handleDone == null) |
| 4128 handleDone = _StreamHandlerTransformer[_defaultHandleDone]; | 4128 handleDone = _StreamHandlerTransformer[_defaultHandleDone]; |
| 4129 return new _HandlerEventSink(handleData, handleError, handleDone, outp
utSink); | 4129 return new _HandlerEventSink(handleData, handleError, handleDone, outp
utSink); |
| 4130 }, "(EventSink<T>) → EventSink<S>")); | 4130 }, "(EventSink<T>) → EventSink<S>")); |
| 4131 } | 4131 } |
| 4132 bind(stream) { | 4132 bind(stream) { |
| 4133 return super.bind(stream); | 4133 return super.bind(stream); |
| 4134 } | 4134 } |
| 4135 static [_defaultHandleData](data, sink) { | 4135 static [_defaultHandleData](data, sink) { |
| 4136 sink.add(data); | 4136 sink.add(data); |
| 4137 } | 4137 } |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4229 let runBinary = opts && 'runBinary' in opts ? opts.runBinary : null; | 4229 let runBinary = opts && 'runBinary' in opts ? opts.runBinary : null; |
| 4230 let registerCallback = opts && 'registerCallback' in opts ? opts.registerC
allback : null; | 4230 let registerCallback = opts && 'registerCallback' in opts ? opts.registerC
allback : null; |
| 4231 let registerUnaryCallback = opts && 'registerUnaryCallback' in opts ? opts
.registerUnaryCallback : null; | 4231 let registerUnaryCallback = opts && 'registerUnaryCallback' in opts ? opts
.registerUnaryCallback : null; |
| 4232 let registerBinaryCallback = opts && 'registerBinaryCallback' in opts ? op
ts.registerBinaryCallback : null; | 4232 let registerBinaryCallback = opts && 'registerBinaryCallback' in opts ? op
ts.registerBinaryCallback : null; |
| 4233 let errorCallback = opts && 'errorCallback' in opts ? opts.errorCallback :
null; | 4233 let errorCallback = opts && 'errorCallback' in opts ? opts.errorCallback :
null; |
| 4234 let scheduleMicrotask = opts && 'scheduleMicrotask' in opts ? opts.schedul
eMicrotask : null; | 4234 let scheduleMicrotask = opts && 'scheduleMicrotask' in opts ? opts.schedul
eMicrotask : null; |
| 4235 let createTimer = opts && 'createTimer' in opts ? opts.createTimer : null; | 4235 let createTimer = opts && 'createTimer' in opts ? opts.createTimer : null; |
| 4236 let createPeriodicTimer = opts && 'createPeriodicTimer' in opts ? opts.cre
atePeriodicTimer : null; | 4236 let createPeriodicTimer = opts && 'createPeriodicTimer' in opts ? opts.cre
atePeriodicTimer : null; |
| 4237 let print = opts && 'print' in opts ? opts.print : null; | 4237 let print = opts && 'print' in opts ? opts.print : null; |
| 4238 let fork = opts && 'fork' in opts ? opts.fork : null; | 4238 let fork = opts && 'fork' in opts ? opts.fork : null; |
| 4239 return new ZoneSpecification({handleUncaughtError: dart.as(handleUncaughtE
rror !== null ? handleUncaughtError : other.handleUncaughtError, dart.throw_("Un
implemented type (Zone, ZoneDelegate, Zone, dynamic, StackTrace) → dynamic")), r
un: dart.as(run !== null ? run : other.run, dart.throw_("Unimplemented type (Zon
e, ZoneDelegate, Zone, () → dynamic) → dynamic")), runUnary: dart.as(runUnary !=
= null ? runUnary : other.runUnary, dart.throw_("Unimplemented type (Zone, ZoneD
elegate, Zone, (dynamic) → dynamic, dynamic) → dynamic")), runBinary: dart.as(ru
nBinary !== null ? runBinary : other.runBinary, dart.throw_("Unimplemented type
(Zone, ZoneDelegate, Zone, (dynamic, dynamic) → dynamic, dynamic, dynamic) → dyn
amic")), registerCallback: dart.as(registerCallback !== null ? registerCallback
: other.registerCallback, dart.throw_("Unimplemented type (Zone, ZoneDelegate, Z
one, () → dynamic) → ZoneCallback")), registerUnaryCallback: dart.as(registerUna
ryCallback !== null ? registerUnaryCallback : other.registerUnaryCallback, dart.
throw_("Unimplemented type (Zone, ZoneDelegate, Zone, (dynamic) → dynamic) → Zon
eUnaryCallback")), registerBinaryCallback: dart.as(registerBinaryCallback !== nu
ll ? registerBinaryCallback : other.registerBinaryCallback, dart.throw_("Unimple
mented type (Zone, ZoneDelegate, Zone, (dynamic, dynamic) → dynamic) → ZoneBinar
yCallback")), errorCallback: dart.as(errorCallback !== null ? errorCallback : ot
her.errorCallback, dart.throw_("Unimplemented type (Zone, ZoneDelegate, Zone, Ob
ject, StackTrace) → AsyncError")), scheduleMicrotask: dart.as(scheduleMicrotask
!== null ? scheduleMicrotask : other.scheduleMicrotask, dart.throw_("Unimplement
ed type (Zone, ZoneDelegate, Zone, () → dynamic) → void")), createTimer: dart.as
(createTimer !== null ? createTimer : other.createTimer, dart.throw_("Unimplemen
ted type (Zone, ZoneDelegate, Zone, Duration, () → void) → Timer")), createPerio
dicTimer: dart.as(createPeriodicTimer !== null ? createPeriodicTimer : other.cre
atePeriodicTimer, dart.throw_("Unimplemented type (Zone, ZoneDelegate, Zone, Dur
ation, (Timer) → void) → Timer")), print: dart.as(print !== null ? print : other
.print, dart.throw_("Unimplemented type (Zone, ZoneDelegate, Zone, String) → voi
d")), fork: dart.as(fork !== null ? fork : other.fork, dart.throw_("Unimplemente
d type (Zone, ZoneDelegate, Zone, ZoneSpecification, Map<dynamic, dynamic>) → Zo
ne"))}); | 4239 return new ZoneSpecification({handleUncaughtError: dart.as(handleUncaughtE
rror != null ? handleUncaughtError : other.handleUncaughtError, dart.throw_("Uni
mplemented type (Zone, ZoneDelegate, Zone, dynamic, StackTrace) → dynamic")), ru
n: dart.as(run != null ? run : other.run, dart.throw_("Unimplemented type (Zone,
ZoneDelegate, Zone, () → dynamic) → dynamic")), runUnary: dart.as(runUnary != n
ull ? runUnary : other.runUnary, dart.throw_("Unimplemented type (Zone, ZoneDele
gate, Zone, (dynamic) → dynamic, dynamic) → dynamic")), runBinary: dart.as(runBi
nary != null ? runBinary : other.runBinary, dart.throw_("Unimplemented type (Zon
e, ZoneDelegate, Zone, (dynamic, dynamic) → dynamic, dynamic, dynamic) → dynamic
")), registerCallback: dart.as(registerCallback != null ? registerCallback : oth
er.registerCallback, dart.throw_("Unimplemented type (Zone, ZoneDelegate, Zone,
() → dynamic) → ZoneCallback")), registerUnaryCallback: dart.as(registerUnaryCal
lback != null ? registerUnaryCallback : other.registerUnaryCallback, dart.throw_
("Unimplemented type (Zone, ZoneDelegate, Zone, (dynamic) → dynamic) → ZoneUnary
Callback")), registerBinaryCallback: dart.as(registerBinaryCallback != null ? re
gisterBinaryCallback : other.registerBinaryCallback, dart.throw_("Unimplemented
type (Zone, ZoneDelegate, Zone, (dynamic, dynamic) → dynamic) → ZoneBinaryCallba
ck")), errorCallback: dart.as(errorCallback != null ? errorCallback : other.erro
rCallback, dart.throw_("Unimplemented type (Zone, ZoneDelegate, Zone, Object, St
ackTrace) → AsyncError")), scheduleMicrotask: dart.as(scheduleMicrotask != null
? scheduleMicrotask : other.scheduleMicrotask, dart.throw_("Unimplemented type (
Zone, ZoneDelegate, Zone, () → dynamic) → void")), createTimer: dart.as(createTi
mer != null ? createTimer : other.createTimer, dart.throw_("Unimplemented type (
Zone, ZoneDelegate, Zone, Duration, () → void) → Timer")), createPeriodicTimer:
dart.as(createPeriodicTimer != null ? createPeriodicTimer : other.createPeriodic
Timer, dart.throw_("Unimplemented type (Zone, ZoneDelegate, Zone, Duration, (Tim
er) → void) → Timer")), print: dart.as(print != null ? print : other.print, dart
.throw_("Unimplemented type (Zone, ZoneDelegate, Zone, String) → void")), fork:
dart.as(fork != null ? fork : other.fork, dart.throw_("Unimplemented type (Zone,
ZoneDelegate, Zone, ZoneSpecification, Map<dynamic, dynamic>) → Zone"))}); |
| 4240 } | 4240 } |
| 4241 } | 4241 } |
| 4242 dart.defineNamedConstructor(ZoneSpecification, 'from'); | 4242 dart.defineNamedConstructor(ZoneSpecification, 'from'); |
| 4243 class _ZoneSpecification extends core.Object { | 4243 class _ZoneSpecification extends core.Object { |
| 4244 _ZoneSpecification(opts) { | 4244 _ZoneSpecification(opts) { |
| 4245 let handleUncaughtError = opts && 'handleUncaughtError' in opts ? opts.han
dleUncaughtError : null; | 4245 let handleUncaughtError = opts && 'handleUncaughtError' in opts ? opts.han
dleUncaughtError : null; |
| 4246 let run = opts && 'run' in opts ? opts.run : null; | 4246 let run = opts && 'run' in opts ? opts.run : null; |
| 4247 let runUnary = opts && 'runUnary' in opts ? opts.runUnary : null; | 4247 let runUnary = opts && 'runUnary' in opts ? opts.runUnary : null; |
| 4248 let runBinary = opts && 'runBinary' in opts ? opts.runBinary : null; | 4248 let runBinary = opts && 'runBinary' in opts ? opts.runBinary : null; |
| 4249 let registerCallback = opts && 'registerCallback' in opts ? opts.registerC
allback : null; | 4249 let registerCallback = opts && 'registerCallback' in opts ? opts.registerC
allback : null; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 4275 let _$ = Symbol('_'); | 4275 let _$ = Symbol('_'); |
| 4276 let _enter = Symbol('_enter'); | 4276 let _enter = Symbol('_enter'); |
| 4277 let _leave = Symbol('_leave'); | 4277 let _leave = Symbol('_leave'); |
| 4278 class Zone extends core.Object { | 4278 class Zone extends core.Object { |
| 4279 [_$]() { | 4279 [_$]() { |
| 4280 } | 4280 } |
| 4281 static get current() { | 4281 static get current() { |
| 4282 return Zone[_current]; | 4282 return Zone[_current]; |
| 4283 } | 4283 } |
| 4284 static [_enter](zone) { | 4284 static [_enter](zone) { |
| 4285 dart.assert(zone !== null); | 4285 dart.assert(zone != null); |
| 4286 dart.assert(!dart.notNull(core.identical(zone, Zone[_current]))); | 4286 dart.assert(!dart.notNull(core.identical(zone, Zone[_current]))); |
| 4287 let previous = Zone[_current]; | 4287 let previous = Zone[_current]; |
| 4288 Zone[_current] = zone; | 4288 Zone[_current] = zone; |
| 4289 return previous; | 4289 return previous; |
| 4290 } | 4290 } |
| 4291 static [_leave](previous) { | 4291 static [_leave](previous) { |
| 4292 dart.assert(previous !== null); | 4292 dart.assert(previous != null); |
| 4293 Zone[_current] = previous; | 4293 Zone[_current] = previous; |
| 4294 } | 4294 } |
| 4295 } | 4295 } |
| 4296 dart.defineNamedConstructor(Zone, _$); | 4296 dart.defineNamedConstructor(Zone, _$); |
| 4297 Zone.ROOT = _ROOT_ZONE; | 4297 Zone.ROOT = _ROOT_ZONE; |
| 4298 Zone._current = _ROOT_ZONE; | 4298 Zone._current = _ROOT_ZONE; |
| 4299 let _delegate = Symbol('_delegate'); | 4299 let _delegate = Symbol('_delegate'); |
| 4300 // Function _parentDelegate: (_Zone) → ZoneDelegate | 4300 // Function _parentDelegate: (_Zone) → ZoneDelegate |
| 4301 function _parentDelegate(zone) { | 4301 function _parentDelegate(zone) { |
| 4302 if (zone.parent === null) | 4302 if (zone.parent == null) |
| 4303 return null; | 4303 return null; |
| 4304 return zone.parent[_delegate]; | 4304 return zone.parent[_delegate]; |
| 4305 } | 4305 } |
| 4306 let _delegationTarget = Symbol('_delegationTarget'); | 4306 let _delegationTarget = Symbol('_delegationTarget'); |
| 4307 let _handleUncaughtError = Symbol('_handleUncaughtError'); | 4307 let _handleUncaughtError = Symbol('_handleUncaughtError'); |
| 4308 let _run = Symbol('_run'); | 4308 let _run = Symbol('_run'); |
| 4309 let _runUnary = Symbol('_runUnary'); | 4309 let _runUnary = Symbol('_runUnary'); |
| 4310 let _runBinary = Symbol('_runBinary'); | 4310 let _runBinary = Symbol('_runBinary'); |
| 4311 let _registerCallback = Symbol('_registerCallback'); | 4311 let _registerCallback = Symbol('_registerCallback'); |
| 4312 let _registerUnaryCallback = Symbol('_registerUnaryCallback'); | 4312 let _registerUnaryCallback = Symbol('_registerUnaryCallback'); |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4391 _Zone() { | 4391 _Zone() { |
| 4392 } | 4392 } |
| 4393 inSameErrorZone(otherZone) { | 4393 inSameErrorZone(otherZone) { |
| 4394 return dart.notNull(core.identical(this, otherZone)) || dart.notNull(core.
identical(this.errorZone, otherZone.errorZone)); | 4394 return dart.notNull(core.identical(this, otherZone)) || dart.notNull(core.
identical(this.errorZone, otherZone.errorZone)); |
| 4395 } | 4395 } |
| 4396 } | 4396 } |
| 4397 let _delegateCache = Symbol('_delegateCache'); | 4397 let _delegateCache = Symbol('_delegateCache'); |
| 4398 let _map = Symbol('_map'); | 4398 let _map = Symbol('_map'); |
| 4399 class _CustomZone extends _Zone { | 4399 class _CustomZone extends _Zone { |
| 4400 get [_delegate]() { | 4400 get [_delegate]() { |
| 4401 if (this[_delegateCache] !== null) | 4401 if (this[_delegateCache] != null) |
| 4402 return this[_delegateCache]; | 4402 return this[_delegateCache]; |
| 4403 this[_delegateCache] = new _ZoneDelegate(this); | 4403 this[_delegateCache] = new _ZoneDelegate(this); |
| 4404 return this[_delegateCache]; | 4404 return this[_delegateCache]; |
| 4405 } | 4405 } |
| 4406 _CustomZone(parent, specification, map) { | 4406 _CustomZone(parent, specification, map) { |
| 4407 this.parent = parent; | 4407 this.parent = parent; |
| 4408 this[_map] = map; | 4408 this[_map] = map; |
| 4409 this[_runUnary] = null; | 4409 this[_runUnary] = null; |
| 4410 this[_run] = null; | 4410 this[_run] = null; |
| 4411 this[_runBinary] = null; | 4411 this[_runBinary] = null; |
| 4412 this[_registerCallback] = null; | 4412 this[_registerCallback] = null; |
| 4413 this[_registerUnaryCallback] = null; | 4413 this[_registerUnaryCallback] = null; |
| 4414 this[_registerBinaryCallback] = null; | 4414 this[_registerBinaryCallback] = null; |
| 4415 this[_errorCallback] = null; | 4415 this[_errorCallback] = null; |
| 4416 this[_scheduleMicrotask] = null; | 4416 this[_scheduleMicrotask] = null; |
| 4417 this[_createTimer] = null; | 4417 this[_createTimer] = null; |
| 4418 this[_createPeriodicTimer] = null; | 4418 this[_createPeriodicTimer] = null; |
| 4419 this[_print] = null; | 4419 this[_print] = null; |
| 4420 this[_fork] = null; | 4420 this[_fork] = null; |
| 4421 this[_handleUncaughtError] = null; | 4421 this[_handleUncaughtError] = null; |
| 4422 this[_delegateCache] = null; | 4422 this[_delegateCache] = null; |
| 4423 super._Zone(); | 4423 super._Zone(); |
| 4424 this[_run] = specification.run !== null ? new _ZoneFunction(this, specific
ation.run) : this.parent[_run]; | 4424 this[_run] = specification.run != null ? new _ZoneFunction(this, specifica
tion.run) : this.parent[_run]; |
| 4425 this[_runUnary] = specification.runUnary !== null ? new _ZoneFunction(this
, specification.runUnary) : this.parent[_runUnary]; | 4425 this[_runUnary] = specification.runUnary != null ? new _ZoneFunction(this,
specification.runUnary) : this.parent[_runUnary]; |
| 4426 this[_runBinary] = specification.runBinary !== null ? new _ZoneFunction(th
is, specification.runBinary) : this.parent[_runBinary]; | 4426 this[_runBinary] = specification.runBinary != null ? new _ZoneFunction(thi
s, specification.runBinary) : this.parent[_runBinary]; |
| 4427 this[_registerCallback] = specification.registerCallback !== null ? new _Z
oneFunction(this, specification.registerCallback) : this.parent[_registerCallbac
k]; | 4427 this[_registerCallback] = specification.registerCallback != null ? new _Zo
neFunction(this, specification.registerCallback) : this.parent[_registerCallback
]; |
| 4428 this[_registerUnaryCallback] = specification.registerUnaryCallback !== nul
l ? new _ZoneFunction(this, specification.registerUnaryCallback) : this.parent[_
registerUnaryCallback]; | 4428 this[_registerUnaryCallback] = specification.registerUnaryCallback != null
? new _ZoneFunction(this, specification.registerUnaryCallback) : this.parent[_r
egisterUnaryCallback]; |
| 4429 this[_registerBinaryCallback] = specification.registerBinaryCallback !== n
ull ? new _ZoneFunction(this, specification.registerBinaryCallback) : this.paren
t[_registerBinaryCallback]; | 4429 this[_registerBinaryCallback] = specification.registerBinaryCallback != nu
ll ? new _ZoneFunction(this, specification.registerBinaryCallback) : this.parent
[_registerBinaryCallback]; |
| 4430 this[_errorCallback] = specification.errorCallback !== null ? new _ZoneFun
ction(this, specification.errorCallback) : this.parent[_errorCallback]; | 4430 this[_errorCallback] = specification.errorCallback != null ? new _ZoneFunc
tion(this, specification.errorCallback) : this.parent[_errorCallback]; |
| 4431 this[_scheduleMicrotask] = specification.scheduleMicrotask !== null ? new
_ZoneFunction(this, specification.scheduleMicrotask) : this.parent[_scheduleMicr
otask]; | 4431 this[_scheduleMicrotask] = specification.scheduleMicrotask != null ? new _
ZoneFunction(this, specification.scheduleMicrotask) : this.parent[_scheduleMicro
task]; |
| 4432 this[_createTimer] = specification.createTimer !== null ? new _ZoneFunctio
n(this, specification.createTimer) : this.parent[_createTimer]; | 4432 this[_createTimer] = specification.createTimer != null ? new _ZoneFunction
(this, specification.createTimer) : this.parent[_createTimer]; |
| 4433 this[_createPeriodicTimer] = specification.createPeriodicTimer !== null ?
new _ZoneFunction(this, specification.createPeriodicTimer) : this.parent[_create
PeriodicTimer]; | 4433 this[_createPeriodicTimer] = specification.createPeriodicTimer != null ? n
ew _ZoneFunction(this, specification.createPeriodicTimer) : this.parent[_createP
eriodicTimer]; |
| 4434 this[_print] = specification.print !== null ? new _ZoneFunction(this, spec
ification.print) : this.parent[_print]; | 4434 this[_print] = specification.print != null ? new _ZoneFunction(this, speci
fication.print) : this.parent[_print]; |
| 4435 this[_fork] = specification.fork !== null ? new _ZoneFunction(this, specif
ication.fork) : this.parent[_fork]; | 4435 this[_fork] = specification.fork != null ? new _ZoneFunction(this, specifi
cation.fork) : this.parent[_fork]; |
| 4436 this[_handleUncaughtError] = specification.handleUncaughtError !== null ?
new _ZoneFunction(this, specification.handleUncaughtError) : this.parent[_handle
UncaughtError]; | 4436 this[_handleUncaughtError] = specification.handleUncaughtError != null ? n
ew _ZoneFunction(this, specification.handleUncaughtError) : this.parent[_handleU
ncaughtError]; |
| 4437 } | 4437 } |
| 4438 get errorZone() { | 4438 get errorZone() { |
| 4439 return this[_handleUncaughtError].zone; | 4439 return this[_handleUncaughtError].zone; |
| 4440 } | 4440 } |
| 4441 runGuarded(f) { | 4441 runGuarded(f) { |
| 4442 try { | 4442 try { |
| 4443 return this.run(f); | 4443 return this.run(f); |
| 4444 } catch (e) { | 4444 } catch (e) { |
| 4445 let s = dart.stackTrace(e); | 4445 let s = dart.stackTrace(e); |
| 4446 return this.handleUncaughtError(e, s); | 4446 return this.handleUncaughtError(e, s); |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4487 let runGuarded = opts && 'runGuarded' in opts ? opts.runGuarded : true; | 4487 let runGuarded = opts && 'runGuarded' in opts ? opts.runGuarded : true; |
| 4488 let registered = this.registerBinaryCallback(f); | 4488 let registered = this.registerBinaryCallback(f); |
| 4489 if (runGuarded) { | 4489 if (runGuarded) { |
| 4490 return ((arg1, arg2) => this.runBinaryGuarded(registered, arg1, arg2)).b
ind(this); | 4490 return ((arg1, arg2) => this.runBinaryGuarded(registered, arg1, arg2)).b
ind(this); |
| 4491 } else { | 4491 } else { |
| 4492 return ((arg1, arg2) => this.runBinary(registered, arg1, arg2)).bind(thi
s); | 4492 return ((arg1, arg2) => this.runBinary(registered, arg1, arg2)).bind(thi
s); |
| 4493 } | 4493 } |
| 4494 } | 4494 } |
| 4495 get(key) { | 4495 get(key) { |
| 4496 let result = this[_map].get(key); | 4496 let result = this[_map].get(key); |
| 4497 if (dart.notNull(result !== null) || dart.notNull(this[_map].containsKey(k
ey))) | 4497 if (dart.notNull(result != null) || dart.notNull(this[_map].containsKey(ke
y))) |
| 4498 return result; | 4498 return result; |
| 4499 if (this.parent !== null) { | 4499 if (this.parent != null) { |
| 4500 let value = this.parent.get(key); | 4500 let value = this.parent.get(key); |
| 4501 if (value !== null) { | 4501 if (value != null) { |
| 4502 this[_map].set(key, value); | 4502 this[_map].set(key, value); |
| 4503 } | 4503 } |
| 4504 return value; | 4504 return value; |
| 4505 } | 4505 } |
| 4506 dart.assert(dart.equals(this, _ROOT_ZONE)); | 4506 dart.assert(dart.equals(this, _ROOT_ZONE)); |
| 4507 return null; | 4507 return null; |
| 4508 } | 4508 } |
| 4509 handleUncaughtError(error, stackTrace) { | 4509 handleUncaughtError(error, stackTrace) { |
| 4510 let implementation = this[_handleUncaughtError]; | 4510 let implementation = this[_handleUncaughtError]; |
| 4511 dart.assert(implementation !== null); | 4511 dart.assert(implementation != null); |
| 4512 let parentDelegate = _parentDelegate(implementation.zone); | 4512 let parentDelegate = _parentDelegate(implementation.zone); |
| 4513 return dart.dinvokef(implementation.function, implementation.zone, parentD
elegate, this, error, stackTrace); | 4513 return dart.dinvokef(implementation.function, implementation.zone, parentD
elegate, this, error, stackTrace); |
| 4514 } | 4514 } |
| 4515 fork(opts) { | 4515 fork(opts) { |
| 4516 let specification = opts && 'specification' in opts ? opts.specification :
null; | 4516 let specification = opts && 'specification' in opts ? opts.specification :
null; |
| 4517 let zoneValues = opts && 'zoneValues' in opts ? opts.zoneValues : null; | 4517 let zoneValues = opts && 'zoneValues' in opts ? opts.zoneValues : null; |
| 4518 let implementation = this[_fork]; | 4518 let implementation = this[_fork]; |
| 4519 dart.assert(implementation !== null); | 4519 dart.assert(implementation != null); |
| 4520 let parentDelegate = _parentDelegate(implementation.zone); | 4520 let parentDelegate = _parentDelegate(implementation.zone); |
| 4521 return dart.as(dart.dinvokef(implementation.function, implementation.zone,
parentDelegate, this, specification, zoneValues), Zone); | 4521 return dart.as(dart.dinvokef(implementation.function, implementation.zone,
parentDelegate, this, specification, zoneValues), Zone); |
| 4522 } | 4522 } |
| 4523 run(f) { | 4523 run(f) { |
| 4524 let implementation = this[_run]; | 4524 let implementation = this[_run]; |
| 4525 dart.assert(implementation !== null); | 4525 dart.assert(implementation != null); |
| 4526 let parentDelegate = _parentDelegate(implementation.zone); | 4526 let parentDelegate = _parentDelegate(implementation.zone); |
| 4527 return dart.dinvokef(implementation.function, implementation.zone, parentD
elegate, this, f); | 4527 return dart.dinvokef(implementation.function, implementation.zone, parentD
elegate, this, f); |
| 4528 } | 4528 } |
| 4529 runUnary(f, arg) { | 4529 runUnary(f, arg) { |
| 4530 let implementation = this[_runUnary]; | 4530 let implementation = this[_runUnary]; |
| 4531 dart.assert(implementation !== null); | 4531 dart.assert(implementation != null); |
| 4532 let parentDelegate = _parentDelegate(implementation.zone); | 4532 let parentDelegate = _parentDelegate(implementation.zone); |
| 4533 return dart.dinvokef(implementation.function, implementation.zone, parentD
elegate, this, f, arg); | 4533 return dart.dinvokef(implementation.function, implementation.zone, parentD
elegate, this, f, arg); |
| 4534 } | 4534 } |
| 4535 runBinary(f, arg1, arg2) { | 4535 runBinary(f, arg1, arg2) { |
| 4536 let implementation = this[_runBinary]; | 4536 let implementation = this[_runBinary]; |
| 4537 dart.assert(implementation !== null); | 4537 dart.assert(implementation != null); |
| 4538 let parentDelegate = _parentDelegate(implementation.zone); | 4538 let parentDelegate = _parentDelegate(implementation.zone); |
| 4539 return dart.dinvokef(implementation.function, implementation.zone, parentD
elegate, this, f, arg1, arg2); | 4539 return dart.dinvokef(implementation.function, implementation.zone, parentD
elegate, this, f, arg1, arg2); |
| 4540 } | 4540 } |
| 4541 registerCallback(f) { | 4541 registerCallback(f) { |
| 4542 let implementation = this[_registerCallback]; | 4542 let implementation = this[_registerCallback]; |
| 4543 dart.assert(implementation !== null); | 4543 dart.assert(implementation != null); |
| 4544 let parentDelegate = _parentDelegate(implementation.zone); | 4544 let parentDelegate = _parentDelegate(implementation.zone); |
| 4545 return dart.as(dart.dinvokef(implementation.function, implementation.zone,
parentDelegate, this, f), ZoneCallback); | 4545 return dart.as(dart.dinvokef(implementation.function, implementation.zone,
parentDelegate, this, f), ZoneCallback); |
| 4546 } | 4546 } |
| 4547 registerUnaryCallback(f) { | 4547 registerUnaryCallback(f) { |
| 4548 let implementation = this[_registerUnaryCallback]; | 4548 let implementation = this[_registerUnaryCallback]; |
| 4549 dart.assert(implementation !== null); | 4549 dart.assert(implementation != null); |
| 4550 let parentDelegate = _parentDelegate(implementation.zone); | 4550 let parentDelegate = _parentDelegate(implementation.zone); |
| 4551 return dart.as(dart.dinvokef(implementation.function, implementation.zone,
parentDelegate, this, f), ZoneUnaryCallback); | 4551 return dart.as(dart.dinvokef(implementation.function, implementation.zone,
parentDelegate, this, f), ZoneUnaryCallback); |
| 4552 } | 4552 } |
| 4553 registerBinaryCallback(f) { | 4553 registerBinaryCallback(f) { |
| 4554 let implementation = this[_registerBinaryCallback]; | 4554 let implementation = this[_registerBinaryCallback]; |
| 4555 dart.assert(implementation !== null); | 4555 dart.assert(implementation != null); |
| 4556 let parentDelegate = _parentDelegate(implementation.zone); | 4556 let parentDelegate = _parentDelegate(implementation.zone); |
| 4557 return dart.as(dart.dinvokef(implementation.function, implementation.zone,
parentDelegate, this, f), ZoneBinaryCallback); | 4557 return dart.as(dart.dinvokef(implementation.function, implementation.zone,
parentDelegate, this, f), ZoneBinaryCallback); |
| 4558 } | 4558 } |
| 4559 errorCallback(error, stackTrace) { | 4559 errorCallback(error, stackTrace) { |
| 4560 let implementation = this[_errorCallback]; | 4560 let implementation = this[_errorCallback]; |
| 4561 dart.assert(implementation !== null); | 4561 dart.assert(implementation != null); |
| 4562 let implementationZone = implementation.zone; | 4562 let implementationZone = implementation.zone; |
| 4563 if (core.identical(implementationZone, _ROOT_ZONE)) | 4563 if (core.identical(implementationZone, _ROOT_ZONE)) |
| 4564 return null; | 4564 return null; |
| 4565 let parentDelegate = _parentDelegate(dart.as(implementationZone, _Zone)); | 4565 let parentDelegate = _parentDelegate(dart.as(implementationZone, _Zone)); |
| 4566 return dart.as(dart.dinvokef(implementation.function, implementationZone,
parentDelegate, this, error, stackTrace), AsyncError); | 4566 return dart.as(dart.dinvokef(implementation.function, implementationZone,
parentDelegate, this, error, stackTrace), AsyncError); |
| 4567 } | 4567 } |
| 4568 scheduleMicrotask(f) { | 4568 scheduleMicrotask(f) { |
| 4569 let implementation = this[_scheduleMicrotask]; | 4569 let implementation = this[_scheduleMicrotask]; |
| 4570 dart.assert(implementation !== null); | 4570 dart.assert(implementation != null); |
| 4571 let parentDelegate = _parentDelegate(implementation.zone); | 4571 let parentDelegate = _parentDelegate(implementation.zone); |
| 4572 return dart.dinvokef(implementation.function, implementation.zone, parentD
elegate, this, f); | 4572 return dart.dinvokef(implementation.function, implementation.zone, parentD
elegate, this, f); |
| 4573 } | 4573 } |
| 4574 createTimer(duration, f) { | 4574 createTimer(duration, f) { |
| 4575 let implementation = this[_createTimer]; | 4575 let implementation = this[_createTimer]; |
| 4576 dart.assert(implementation !== null); | 4576 dart.assert(implementation != null); |
| 4577 let parentDelegate = _parentDelegate(implementation.zone); | 4577 let parentDelegate = _parentDelegate(implementation.zone); |
| 4578 return dart.as(dart.dinvokef(implementation.function, implementation.zone,
parentDelegate, this, duration, f), Timer); | 4578 return dart.as(dart.dinvokef(implementation.function, implementation.zone,
parentDelegate, this, duration, f), Timer); |
| 4579 } | 4579 } |
| 4580 createPeriodicTimer(duration, f) { | 4580 createPeriodicTimer(duration, f) { |
| 4581 let implementation = this[_createPeriodicTimer]; | 4581 let implementation = this[_createPeriodicTimer]; |
| 4582 dart.assert(implementation !== null); | 4582 dart.assert(implementation != null); |
| 4583 let parentDelegate = _parentDelegate(implementation.zone); | 4583 let parentDelegate = _parentDelegate(implementation.zone); |
| 4584 return dart.as(dart.dinvokef(implementation.function, implementation.zone,
parentDelegate, this, duration, f), Timer); | 4584 return dart.as(dart.dinvokef(implementation.function, implementation.zone,
parentDelegate, this, duration, f), Timer); |
| 4585 } | 4585 } |
| 4586 print(line) { | 4586 print(line) { |
| 4587 let implementation = this[_print]; | 4587 let implementation = this[_print]; |
| 4588 dart.assert(implementation !== null); | 4588 dart.assert(implementation != null); |
| 4589 let parentDelegate = _parentDelegate(implementation.zone); | 4589 let parentDelegate = _parentDelegate(implementation.zone); |
| 4590 return dart.dinvokef(implementation.function, implementation.zone, parentD
elegate, this, line); | 4590 return dart.dinvokef(implementation.function, implementation.zone, parentD
elegate, this, line); |
| 4591 } | 4591 } |
| 4592 } | 4592 } |
| 4593 // Function _rootHandleUncaughtError: (Zone, ZoneDelegate, Zone, dynamic, Stac
kTrace) → void | 4593 // Function _rootHandleUncaughtError: (Zone, ZoneDelegate, Zone, dynamic, Stac
kTrace) → void |
| 4594 function _rootHandleUncaughtError(self, parent, zone, error, stackTrace) { | 4594 function _rootHandleUncaughtError(self, parent, zone, error, stackTrace) { |
| 4595 _schedulePriorityAsyncCallback(() => { | 4595 _schedulePriorityAsyncCallback(() => { |
| 4596 throw new _UncaughtAsyncError(error, stackTrace); | 4596 throw new _UncaughtAsyncError(error, stackTrace); |
| 4597 }); | 4597 }); |
| 4598 } | 4598 } |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4671 function _rootPrint(self, parent, zone, line) { | 4671 function _rootPrint(self, parent, zone, line) { |
| 4672 _internal.printToConsole(line); | 4672 _internal.printToConsole(line); |
| 4673 } | 4673 } |
| 4674 // Function _printToZone: (String) → void | 4674 // Function _printToZone: (String) → void |
| 4675 function _printToZone(line) { | 4675 function _printToZone(line) { |
| 4676 Zone.current.print(line); | 4676 Zone.current.print(line); |
| 4677 } | 4677 } |
| 4678 // Function _rootFork: (Zone, ZoneDelegate, Zone, ZoneSpecification, Map<dynam
ic, dynamic>) → Zone | 4678 // Function _rootFork: (Zone, ZoneDelegate, Zone, ZoneSpecification, Map<dynam
ic, dynamic>) → Zone |
| 4679 function _rootFork(self, parent, zone, specification, zoneValues) { | 4679 function _rootFork(self, parent, zone, specification, zoneValues) { |
| 4680 _internal.printToZone = _printToZone; | 4680 _internal.printToZone = _printToZone; |
| 4681 if (specification === null) { | 4681 if (specification == null) { |
| 4682 specification = new ZoneSpecification(); | 4682 specification = new ZoneSpecification(); |
| 4683 } else if (!dart.is(specification, _ZoneSpecification)) { | 4683 } else if (!dart.is(specification, _ZoneSpecification)) { |
| 4684 throw new core.ArgumentError("ZoneSpecifications must be instantiated" + "
with the provided constructor."); | 4684 throw new core.ArgumentError("ZoneSpecifications must be instantiated" + "
with the provided constructor."); |
| 4685 } | 4685 } |
| 4686 let valueMap = null; | 4686 let valueMap = null; |
| 4687 if (zoneValues === null) { | 4687 if (zoneValues == null) { |
| 4688 if (dart.is(zone, _Zone)) { | 4688 if (dart.is(zone, _Zone)) { |
| 4689 valueMap = zone[_map]; | 4689 valueMap = zone[_map]; |
| 4690 } else { | 4690 } else { |
| 4691 valueMap = new collection.HashMap(); | 4691 valueMap = new collection.HashMap(); |
| 4692 } | 4692 } |
| 4693 } else { | 4693 } else { |
| 4694 valueMap = new collection.HashMap.from(zoneValues); | 4694 valueMap = new collection.HashMap.from(zoneValues); |
| 4695 } | 4695 } |
| 4696 return new _CustomZone(dart.as(zone, _Zone), specification, valueMap); | 4696 return new _CustomZone(dart.as(zone, _Zone), specification, valueMap); |
| 4697 } | 4697 } |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4781 get [_handleUncaughtError]() { | 4781 get [_handleUncaughtError]() { |
| 4782 return new _ZoneFunction(_ROOT_ZONE, _rootHandleUncaughtError); | 4782 return new _ZoneFunction(_ROOT_ZONE, _rootHandleUncaughtError); |
| 4783 } | 4783 } |
| 4784 get parent() { | 4784 get parent() { |
| 4785 return null; | 4785 return null; |
| 4786 } | 4786 } |
| 4787 get [_map]() { | 4787 get [_map]() { |
| 4788 return _RootZone[_rootMap]; | 4788 return _RootZone[_rootMap]; |
| 4789 } | 4789 } |
| 4790 get [_delegate]() { | 4790 get [_delegate]() { |
| 4791 if (_RootZone[_rootDelegate] !== null) | 4791 if (_RootZone[_rootDelegate] != null) |
| 4792 return _RootZone[_rootDelegate]; | 4792 return _RootZone[_rootDelegate]; |
| 4793 return _RootZone[_rootDelegate] = new _ZoneDelegate(this); | 4793 return _RootZone[_rootDelegate] = new _ZoneDelegate(this); |
| 4794 } | 4794 } |
| 4795 get errorZone() { | 4795 get errorZone() { |
| 4796 return this; | 4796 return this; |
| 4797 } | 4797 } |
| 4798 runGuarded(f) { | 4798 runGuarded(f) { |
| 4799 try { | 4799 try { |
| 4800 if (core.identical(_ROOT_ZONE, Zone[_current])) { | 4800 if (core.identical(_ROOT_ZONE, Zone[_current])) { |
| 4801 return f(); | 4801 return f(); |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4913 }, | 4913 }, |
| 4914 set _rootMap(_) {} | 4914 set _rootMap(_) {} |
| 4915 }); | 4915 }); |
| 4916 let _ROOT_ZONE = new _RootZone(); | 4916 let _ROOT_ZONE = new _RootZone(); |
| 4917 // Function runZoned: (() → dynamic, {zoneValues: Map<dynamic, dynamic>, zoneS
pecification: ZoneSpecification, onError: Function}) → dynamic | 4917 // Function runZoned: (() → dynamic, {zoneValues: Map<dynamic, dynamic>, zoneS
pecification: ZoneSpecification, onError: Function}) → dynamic |
| 4918 function runZoned(body, opts) { | 4918 function runZoned(body, opts) { |
| 4919 let zoneValues = opts && 'zoneValues' in opts ? opts.zoneValues : null; | 4919 let zoneValues = opts && 'zoneValues' in opts ? opts.zoneValues : null; |
| 4920 let zoneSpecification = opts && 'zoneSpecification' in opts ? opts.zoneSpeci
fication : null; | 4920 let zoneSpecification = opts && 'zoneSpecification' in opts ? opts.zoneSpeci
fication : null; |
| 4921 let onError = opts && 'onError' in opts ? opts.onError : null; | 4921 let onError = opts && 'onError' in opts ? opts.onError : null; |
| 4922 let errorHandler = null; | 4922 let errorHandler = null; |
| 4923 if (onError !== null) { | 4923 if (onError != null) { |
| 4924 errorHandler = (self, parent, zone, error, stackTrace) => { | 4924 errorHandler = (self, parent, zone, error, stackTrace) => { |
| 4925 try { | 4925 try { |
| 4926 if (dart.is(onError, ZoneBinaryCallback)) { | 4926 if (dart.is(onError, ZoneBinaryCallback)) { |
| 4927 return self.parent.runBinary(onError, error, stackTrace); | 4927 return self.parent.runBinary(onError, error, stackTrace); |
| 4928 } | 4928 } |
| 4929 return self.parent.runUnary(dart.as(onError, dart.throw_("Unimplemente
d type (dynamic) → dynamic")), error); | 4929 return self.parent.runUnary(dart.as(onError, dart.throw_("Unimplemente
d type (dynamic) → dynamic")), error); |
| 4930 } catch (e) { | 4930 } catch (e) { |
| 4931 let s = dart.stackTrace(e); | 4931 let s = dart.stackTrace(e); |
| 4932 if (core.identical(e, error)) { | 4932 if (core.identical(e, error)) { |
| 4933 return parent.handleUncaughtError(zone, error, stackTrace); | 4933 return parent.handleUncaughtError(zone, error, stackTrace); |
| 4934 } else { | 4934 } else { |
| 4935 return parent.handleUncaughtError(zone, e, s); | 4935 return parent.handleUncaughtError(zone, e, s); |
| 4936 } | 4936 } |
| 4937 } | 4937 } |
| 4938 | 4938 |
| 4939 }; | 4939 }; |
| 4940 } | 4940 } |
| 4941 if (zoneSpecification === null) { | 4941 if (zoneSpecification == null) { |
| 4942 zoneSpecification = new ZoneSpecification({handleUncaughtError: errorHandl
er}); | 4942 zoneSpecification = new ZoneSpecification({handleUncaughtError: errorHandl
er}); |
| 4943 } else if (errorHandler !== null) { | 4943 } else if (errorHandler != null) { |
| 4944 zoneSpecification = new ZoneSpecification.from(zoneSpecification, {handleU
ncaughtError: errorHandler}); | 4944 zoneSpecification = new ZoneSpecification.from(zoneSpecification, {handleU
ncaughtError: errorHandler}); |
| 4945 } | 4945 } |
| 4946 let zone = Zone.current.fork({specification: zoneSpecification, zoneValues:
zoneValues}); | 4946 let zone = Zone.current.fork({specification: zoneSpecification, zoneValues:
zoneValues}); |
| 4947 if (onError !== null) { | 4947 if (onError != null) { |
| 4948 return zone.runGuarded(body); | 4948 return zone.runGuarded(body); |
| 4949 } else { | 4949 } else { |
| 4950 return zone.run(body); | 4950 return zone.run(body); |
| 4951 } | 4951 } |
| 4952 } | 4952 } |
| 4953 dart.copyProperties(exports, { | 4953 dart.copyProperties(exports, { |
| 4954 get _hasDocument() { | 4954 get _hasDocument() { |
| 4955 return dart.equals(typeof document, 'object'); | 4955 return typeof document == 'object'; |
| 4956 } | 4956 } |
| 4957 }); | 4957 }); |
| 4958 // Exports: | 4958 // Exports: |
| 4959 exports.AsyncError = AsyncError; | 4959 exports.AsyncError = AsyncError; |
| 4960 exports.Stream = Stream; | 4960 exports.Stream = Stream; |
| 4961 exports.Stream$ = Stream$; | 4961 exports.Stream$ = Stream$; |
| 4962 exports.DeferredLibrary = DeferredLibrary; | 4962 exports.DeferredLibrary = DeferredLibrary; |
| 4963 exports.DeferredLoadException = DeferredLoadException; | 4963 exports.DeferredLoadException = DeferredLoadException; |
| 4964 exports.Future = Future; | 4964 exports.Future = Future; |
| 4965 exports.Future$ = Future$; | 4965 exports.Future$ = Future$; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 4982 exports.StreamIterator = StreamIterator; | 4982 exports.StreamIterator = StreamIterator; |
| 4983 exports.StreamIterator$ = StreamIterator$; | 4983 exports.StreamIterator$ = StreamIterator$; |
| 4984 exports.StreamController = StreamController; | 4984 exports.StreamController = StreamController; |
| 4985 exports.StreamController$ = StreamController$; | 4985 exports.StreamController$ = StreamController$; |
| 4986 exports.Timer = Timer; | 4986 exports.Timer = Timer; |
| 4987 exports.ZoneSpecification = ZoneSpecification; | 4987 exports.ZoneSpecification = ZoneSpecification; |
| 4988 exports.ZoneDelegate = ZoneDelegate; | 4988 exports.ZoneDelegate = ZoneDelegate; |
| 4989 exports.Zone = Zone; | 4989 exports.Zone = Zone; |
| 4990 exports.runZoned = runZoned; | 4990 exports.runZoned = runZoned; |
| 4991 })(async || (async = {})); | 4991 })(async || (async = {})); |
| OLD | NEW |