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 } |
11 } | 11 } |
12 // Function _registerErrorHandler: (Function, Zone) → Function | 12 // Function _registerErrorHandler: (Function, Zone) → Function |
13 function _registerErrorHandler(errorHandler, zone) { | 13 function _registerErrorHandler(errorHandler, zone) { |
14 if (dart.is(errorHandler, ZoneBinaryCallback)) { | 14 if (dart.is(errorHandler, ZoneBinaryCallback)) { |
15 return zone.registerBinaryCallback(errorHandler); | 15 return zone.registerBinaryCallback(errorHandler); |
16 } else { | 16 } else { |
17 return zone.registerUnaryCallback(dart.as(errorHandler, dart.throw_("Unimp
lemented type (dynamic) → dynamic"))); | 17 return zone.registerUnaryCallback(dart.as(errorHandler, dart.throw_("Unimp
lemented type (dynamic) → dynamic"))); |
18 } | 18 } |
19 } | 19 } |
20 let _getBestStackTrace = Symbol('_getBestStackTrace'); | 20 let _getBestStackTrace$ = Symbol('_getBestStackTrace'); |
21 class AsyncError extends core.Object { | 21 class AsyncError extends core.Object { |
22 AsyncError(error, stackTrace) { | 22 AsyncError(error, stackTrace) { |
23 this.error = error; | 23 this.error = error; |
24 this.stackTrace = stackTrace; | 24 this.stackTrace = stackTrace; |
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, _getBestStackTrace(error, stackTrace)); | 32 super.AsyncError(error, _getBestStackTrace(error, stackTrace)); |
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) { |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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((($tmp) => computationCount = dart.notNull($tmp
) + 1, $tmp)(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: (() => { |
(...skipping 18 matching lines...) Expand all Loading... |
116 timer = null; | 116 timer = null; |
117 }).bind(this)}); | 117 }).bind(this)}); |
118 return controller.stream; | 118 return controller.stream; |
119 } | 119 } |
120 Stream$eventTransformed(source, mapSink) { | 120 Stream$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; |
125 } | 125 } |
126 asBroadcastStream(opt$) { | 126 asBroadcastStream(opts) { |
127 let onListen = opt$ && 'onListen' in opt$ ? opt$.onListen : null; | 127 let onListen = opts && 'onListen' in opts ? opts.onListen : null; |
128 let onCancel = opt$ && 'onCancel' in opt$ ? opt$.onCancel : null; | 128 let onCancel = opts && 'onCancel' in opts ? opts.onCancel : null; |
129 return new _AsBroadcastStream(this, dart.closureWrap(onListen, "(StreamS
ubscription<dynamic>) → void"), dart.closureWrap(onCancel, "(StreamSubscription<
dynamic>) → void")); | 129 return new _AsBroadcastStream(this, dart.closureWrap(onListen, "(StreamS
ubscription<dynamic>) → void"), dart.closureWrap(onCancel, "(StreamSubscription<
dynamic>) → void")); |
130 } | 130 } |
131 where(test) { | 131 where(test) { |
132 return new _WhereStream(this, test); | 132 return new _WhereStream(this, test); |
133 } | 133 } |
134 map(convert) { | 134 map(convert) { |
135 return new _MapStream(this, convert); | 135 return new _MapStream(this, convert); |
136 } | 136 } |
137 asyncMap(convert) { | 137 asyncMap(convert) { |
138 let controller = null; | 138 let controller = null; |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 controller = new StreamController({onListen: onListen, onPause: (() =>
{ | 207 controller = new StreamController({onListen: onListen, onPause: (() =>
{ |
208 subscription.pause(); | 208 subscription.pause(); |
209 }).bind(this), onResume: (() => { | 209 }).bind(this), onResume: (() => { |
210 subscription.resume(); | 210 subscription.resume(); |
211 }).bind(this), onCancel: (() => { | 211 }).bind(this), onCancel: (() => { |
212 subscription.cancel(); | 212 subscription.cancel(); |
213 }).bind(this), sync: true}); | 213 }).bind(this), sync: true}); |
214 } | 214 } |
215 return controller.stream; | 215 return controller.stream; |
216 } | 216 } |
217 handleError(onError, opt$) { | 217 handleError(onError, opts) { |
218 let test = opt$ && 'test' in opt$ ? opt$.test : null; | 218 let test = opts && 'test' in opts ? opts.test : null; |
219 return new _HandleErrorStream(this, onError, test); | 219 return new _HandleErrorStream(this, onError, test); |
220 } | 220 } |
221 expand(convert) { | 221 expand(convert) { |
222 return new _ExpandStream(this, convert); | 222 return new _ExpandStream(this, convert); |
223 } | 223 } |
224 pipe(streamConsumer) { | 224 pipe(streamConsumer) { |
225 return streamConsumer.addStream(this).then(((_) => streamConsumer.close(
)).bind(this)); | 225 return streamConsumer.addStream(this).then(((_) => streamConsumer.close(
)).bind(this)); |
226 } | 226 } |
227 transform(streamTransformer) { | 227 transform(streamTransformer) { |
228 return streamTransformer.bind(this); | 228 return streamTransformer.bind(this); |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
481 try { | 481 try { |
482 throw _internal.IterableElementError.noElement(); | 482 throw _internal.IterableElementError.noElement(); |
483 } catch (e) { | 483 } catch (e) { |
484 let s = dart.stackTrace(e); | 484 let s = dart.stackTrace(e); |
485 _completeWithErrorCallback(future, e, s); | 485 _completeWithErrorCallback(future, e, s); |
486 } | 486 } |
487 | 487 |
488 }).bind(this), cancelOnError: true}); | 488 }).bind(this), cancelOnError: true}); |
489 return future; | 489 return future; |
490 } | 490 } |
491 firstWhere(test, opt$) { | 491 firstWhere(test, opts) { |
492 let defaultValue = opt$ && 'defaultValue' in opt$ ? opt$.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, opt$) { | 516 lastWhere(test, opts) { |
517 let defaultValue = opt$ && 'defaultValue' in opt$ ? opt$.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 } |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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, opt$) { | 602 timeout(timeLimit, opts) { |
603 let onTimeout = opt$ && 'onTimeout' in opt$ ? opt$.onTimeout : null; | 603 let onTimeout = opts && 'onTimeout' in opts ? opts.onTimeout : null; |
604 let controller = null; | 604 let controller = null; |
605 let subscription = null; | 605 let subscription = null; |
606 let timer = null; | 606 let timer = null; |
607 let zone = null; | 607 let zone = null; |
608 let timeout = null; | 608 let timeout = null; |
609 // Function onData: (T) → void | 609 // Function onData: (T) → void |
610 function onData(event) { | 610 function onData(event) { |
611 timer.cancel(); | 611 timer.cancel(); |
612 controller.add(event); | 612 controller.add(event); |
613 timer = zone.createTimer(timeLimit, dart.as(timeout, dart.throw_("Unim
plemented type () → void"))); | 613 timer = zone.createTimer(timeLimit, dart.as(timeout, dart.throw_("Unim
plemented type () → void"))); |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
663 } | 663 } |
664 dart.defineNamedConstructor(Stream, 'fromFuture'); | 664 dart.defineNamedConstructor(Stream, 'fromFuture'); |
665 dart.defineNamedConstructor(Stream, 'fromIterable'); | 665 dart.defineNamedConstructor(Stream, 'fromIterable'); |
666 dart.defineNamedConstructor(Stream, 'periodic'); | 666 dart.defineNamedConstructor(Stream, 'periodic'); |
667 dart.defineNamedConstructor(Stream, 'eventTransformed'); | 667 dart.defineNamedConstructor(Stream, 'eventTransformed'); |
668 return Stream; | 668 return Stream; |
669 }); | 669 }); |
670 let Stream = Stream$(dart.dynamic); | 670 let Stream = Stream$(dart.dynamic); |
671 let _StreamImpl$ = dart.generic(function(T) { | 671 let _StreamImpl$ = dart.generic(function(T) { |
672 class _StreamImpl extends Stream$(T) { | 672 class _StreamImpl extends Stream$(T) { |
673 listen(onData, opt$) { | 673 listen(onData, opts) { |
674 let onError = opt$ && 'onError' in opt$ ? opt$.onError : null; | 674 let onError = opts && 'onError' in opts ? opts.onError : null; |
675 let onDone = opt$ && 'onDone' in opt$ ? opt$.onDone : null; | 675 let onDone = opts && 'onDone' in opts ? opts.onDone : null; |
676 let cancelOnError = opt$ && 'cancelOnError' in opt$ ? opt$.cancelOnError
: null; | 676 let cancelOnError = opts && 'cancelOnError' in opts ? opts.cancelOnError
: null; |
677 cancelOnError = core.identical(true, cancelOnError); | 677 cancelOnError = core.identical(true, cancelOnError); |
678 let subscription = this[_createSubscription](onData, onError, onDone, ca
ncelOnError); | 678 let subscription = this[_createSubscription](onData, onError, onDone, ca
ncelOnError); |
679 this[_onListen](subscription); | 679 this[_onListen](subscription); |
680 return dart.as(subscription, StreamSubscription$(T)); | 680 return dart.as(subscription, StreamSubscription$(T)); |
681 } | 681 } |
682 [_createSubscription](onData, onError, onDone, cancelOnError) { | 682 [_createSubscription](onData, onError, onDone, cancelOnError) { |
683 return new _BufferingStreamSubscription(onData, onError, onDone, cancelO
nError); | 683 return new _BufferingStreamSubscription(onData, onError, onDone, cancelO
nError); |
684 } | 684 } |
685 [_onListen](subscription) {} | 685 [_onListen](subscription) {} |
686 } | 686 } |
687 return _StreamImpl; | 687 return _StreamImpl; |
688 }); | 688 }); |
689 let _StreamImpl = _StreamImpl$(dart.dynamic); | 689 let _StreamImpl = _StreamImpl$(dart.dynamic); |
690 let _ControllerStream$ = dart.generic(function(T) { | 690 let _ControllerStream$ = dart.generic(function(T) { |
691 class _ControllerStream extends _StreamImpl$(T) { | 691 class _ControllerStream extends _StreamImpl$(T) { |
692 _ControllerStream($_controller) { | 692 _ControllerStream(controller$) { |
693 this[_controller] = $_controller; | 693 this[_controller] = controller$; |
694 super._StreamImpl(); | 694 super._StreamImpl(); |
695 } | 695 } |
696 [_createSubscription](onData, onError, onDone, cancelOnError) { | 696 [_createSubscription](onData, onError, onDone, cancelOnError) { |
697 return this[_controller]._subscribe(onData, onError, onDone, cancelOnErr
or); | 697 return this[_controller]._subscribe(onData, onError, onDone, cancelOnErr
or); |
698 } | 698 } |
699 get hashCode() { | 699 get hashCode() { |
700 return dart.notNull(this[_controller].hashCode) ^ 892482866; | 700 return dart.notNull(this[_controller].hashCode) ^ 892482866; |
701 } | 701 } |
702 ['=='](other) { | 702 ['=='](other) { |
703 if (core.identical(this, other)) | 703 if (core.identical(this, other)) |
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1073 _BufferingStreamSubscription._STATE_WAIT_FOR_CANCEL = 16; | 1073 _BufferingStreamSubscription._STATE_WAIT_FOR_CANCEL = 16; |
1074 _BufferingStreamSubscription._STATE_IN_CALLBACK = 32; | 1074 _BufferingStreamSubscription._STATE_IN_CALLBACK = 32; |
1075 _BufferingStreamSubscription._STATE_HAS_PENDING = 64; | 1075 _BufferingStreamSubscription._STATE_HAS_PENDING = 64; |
1076 _BufferingStreamSubscription._STATE_PAUSE_COUNT = 128; | 1076 _BufferingStreamSubscription._STATE_PAUSE_COUNT = 128; |
1077 _BufferingStreamSubscription._STATE_PAUSE_COUNT_SHIFT = 7; | 1077 _BufferingStreamSubscription._STATE_PAUSE_COUNT_SHIFT = 7; |
1078 return _BufferingStreamSubscription; | 1078 return _BufferingStreamSubscription; |
1079 }); | 1079 }); |
1080 let _BufferingStreamSubscription = _BufferingStreamSubscription$(dart.dynamic)
; | 1080 let _BufferingStreamSubscription = _BufferingStreamSubscription$(dart.dynamic)
; |
1081 let _ControllerSubscription$ = dart.generic(function(T) { | 1081 let _ControllerSubscription$ = dart.generic(function(T) { |
1082 class _ControllerSubscription extends _BufferingStreamSubscription$(T) { | 1082 class _ControllerSubscription extends _BufferingStreamSubscription$(T) { |
1083 _ControllerSubscription($_controller, onData, onError, onDone, cancelOnErr
or) { | 1083 _ControllerSubscription(controller$, onData, onError, onDone, cancelOnErro
r) { |
1084 this[_controller] = $_controller; | 1084 this[_controller] = controller$; |
1085 super._BufferingStreamSubscription(onData, onError, onDone, cancelOnErro
r); | 1085 super._BufferingStreamSubscription(onData, onError, onDone, cancelOnErro
r); |
1086 } | 1086 } |
1087 [_onCancel]() { | 1087 [_onCancel]() { |
1088 return this[_controller]._recordCancel(this); | 1088 return this[_controller]._recordCancel(this); |
1089 } | 1089 } |
1090 [_onPause]() { | 1090 [_onPause]() { |
1091 this[_controller]._recordPause(this); | 1091 this[_controller]._recordPause(this); |
1092 } | 1092 } |
1093 [_onResume]() { | 1093 [_onResume]() { |
1094 this[_controller]._recordResume(this); | 1094 this[_controller]._recordResume(this); |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1147 let _recordCancel = Symbol('_recordCancel'); | 1147 let _recordCancel = Symbol('_recordCancel'); |
1148 let _callOnCancel = Symbol('_callOnCancel'); | 1148 let _callOnCancel = Symbol('_callOnCancel'); |
1149 let _recordPause = Symbol('_recordPause'); | 1149 let _recordPause = Symbol('_recordPause'); |
1150 let _recordResume = Symbol('_recordResume'); | 1150 let _recordResume = Symbol('_recordResume'); |
1151 let _addEventError = Symbol('_addEventError'); | 1151 let _addEventError = Symbol('_addEventError'); |
1152 let _forEachListener = Symbol('_forEachListener'); | 1152 let _forEachListener = Symbol('_forEachListener'); |
1153 let _STATE_FIRING = Symbol('_STATE_FIRING'); | 1153 let _STATE_FIRING = Symbol('_STATE_FIRING'); |
1154 let _mayComplete = Symbol('_mayComplete'); | 1154 let _mayComplete = Symbol('_mayComplete'); |
1155 let _BroadcastStreamController$ = dart.generic(function(T) { | 1155 let _BroadcastStreamController$ = dart.generic(function(T) { |
1156 class _BroadcastStreamController extends core.Object { | 1156 class _BroadcastStreamController extends core.Object { |
1157 _BroadcastStreamController($_onListen, $_onCancel) { | 1157 _BroadcastStreamController(onListen$, onCancel$) { |
1158 this[_onListen] = $_onListen; | 1158 this[_onListen] = onListen$; |
1159 this[_onCancel] = $_onCancel; | 1159 this[_onCancel] = onCancel$; |
1160 this[_state] = _BroadcastStreamController._STATE_INITIAL; | 1160 this[_state] = _BroadcastStreamController._STATE_INITIAL; |
1161 this[_next] = null; | 1161 this[_next] = null; |
1162 this[_previous] = null; | 1162 this[_previous] = null; |
1163 this[_addStreamState] = null; | 1163 this[_addStreamState] = null; |
1164 this[_doneFuture] = null; | 1164 this[_doneFuture] = null; |
1165 this[_next] = this[_previous] = this; | 1165 this[_next] = this[_previous] = this; |
1166 } | 1166 } |
1167 get stream() { | 1167 get stream() { |
1168 return new _BroadcastStream(this); | 1168 return new _BroadcastStream(this); |
1169 } | 1169 } |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1280 if (!dart.notNull(this[_mayAddEvent])) | 1280 if (!dart.notNull(this[_mayAddEvent])) |
1281 throw this[_addEventError](); | 1281 throw this[_addEventError](); |
1282 this[_state] = _BroadcastStreamController._STATE_CLOSED; | 1282 this[_state] = _BroadcastStreamController._STATE_CLOSED; |
1283 let doneFuture = this[_ensureDoneFuture](); | 1283 let doneFuture = this[_ensureDoneFuture](); |
1284 this[_sendDone](); | 1284 this[_sendDone](); |
1285 return doneFuture; | 1285 return doneFuture; |
1286 } | 1286 } |
1287 get done() { | 1287 get done() { |
1288 return this[_ensureDoneFuture](); | 1288 return this[_ensureDoneFuture](); |
1289 } | 1289 } |
1290 addStream(stream, opt$) { | 1290 addStream(stream, opts) { |
1291 let cancelOnError = opt$ && 'cancelOnError' in opt$ ? opt$.cancelOnError
: true; | 1291 let cancelOnError = opts && 'cancelOnError' in opts ? opts.cancelOnError
: true; |
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_ADDSTREAM; | 1294 this[_state] = _BroadcastStreamController._STATE_ADDSTREAM; |
1295 this[_addStreamState] = dart.as(new _AddStreamState(this, stream, cancel
OnError), _AddStreamState$(T)); | 1295 this[_addStreamState] = dart.as(new _AddStreamState(this, stream, cancel
OnError), _AddStreamState$(T)); |
1296 return this[_addStreamState].addStreamFuture; | 1296 return this[_addStreamState].addStreamFuture; |
1297 } | 1297 } |
1298 [_add](data) { | 1298 [_add](data) { |
1299 this[_sendData](data); | 1299 this[_sendData](data); |
1300 } | 1300 } |
1301 [_addError](error, stackTrace) { | 1301 [_addError](error, stackTrace) { |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1525 asFuture(value) { | 1525 asFuture(value) { |
1526 if (value === void 0) | 1526 if (value === void 0) |
1527 value = null; | 1527 value = null; |
1528 return new _Future(); | 1528 return new _Future(); |
1529 } | 1529 } |
1530 } | 1530 } |
1531 return _DoneSubscription; | 1531 return _DoneSubscription; |
1532 }); | 1532 }); |
1533 let _DoneSubscription = _DoneSubscription$(dart.dynamic); | 1533 let _DoneSubscription = _DoneSubscription$(dart.dynamic); |
1534 class DeferredLibrary extends core.Object { | 1534 class DeferredLibrary extends core.Object { |
1535 DeferredLibrary(libraryName, opt$) { | 1535 DeferredLibrary(libraryName, opts) { |
1536 let uri = opt$ && 'uri' in opt$ ? opt$.uri : null; | 1536 let uri = opts && 'uri' in opts ? opts.uri : null; |
1537 this.libraryName = libraryName; | 1537 this.libraryName = libraryName; |
1538 this.uri = uri; | 1538 this.uri = uri; |
1539 } | 1539 } |
1540 load() { | 1540 load() { |
1541 throw 'DeferredLibrary not supported. ' + 'please use the `import "lib.dar
t" deferred as lib` syntax.'; | 1541 throw 'DeferredLibrary not supported. ' + 'please use the `import "lib.dar
t" deferred as lib` syntax.'; |
1542 } | 1542 } |
1543 } | 1543 } |
1544 let _s = Symbol('_s'); | 1544 let _s = Symbol('_s'); |
1545 class DeferredLoadException extends core.Object { | 1545 class DeferredLoadException extends core.Object { |
1546 DeferredLoadException($_s) { | 1546 DeferredLoadException(s$) { |
1547 this[_s] = $_s; | 1547 this[_s] = s$; |
1548 } | 1548 } |
1549 toString() { | 1549 toString() { |
1550 return `DeferredLoadException: '${this[_s]}'`; | 1550 return `DeferredLoadException: '${this[_s]}'`; |
1551 } | 1551 } |
1552 } | 1552 } |
1553 let Future$ = dart.generic(function(T) { | 1553 let Future$ = dart.generic(function(T) { |
1554 class Future extends core.Object { | 1554 class Future extends core.Object { |
1555 Future(computation) { | 1555 Future(computation) { |
1556 let result = new _Future(); | 1556 let result = new _Future(); |
1557 Timer.run((() => { | 1557 Timer.run((() => { |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1614 try { | 1614 try { |
1615 result._complete(computation === null ? null : computation()); | 1615 result._complete(computation === null ? null : computation()); |
1616 } catch (e) { | 1616 } catch (e) { |
1617 let s = dart.stackTrace(e); | 1617 let s = dart.stackTrace(e); |
1618 _completeWithErrorCallback(result, e, s); | 1618 _completeWithErrorCallback(result, e, s); |
1619 } | 1619 } |
1620 | 1620 |
1621 }).bind(this)); | 1621 }).bind(this)); |
1622 return dart.as(result, Future$(T)); | 1622 return dart.as(result, Future$(T)); |
1623 } | 1623 } |
1624 static wait(futures, opt$) { | 1624 static wait(futures, opts) { |
1625 let eagerError = opt$ && 'eagerError' in opt$ ? opt$.eagerError : false; | 1625 let eagerError = opts && 'eagerError' in opts ? opts.eagerError : false; |
1626 let cleanUp = opt$ && 'cleanUp' in opt$ ? opt$.cleanUp : null; | 1626 let cleanUp = opts && 'cleanUp' in opts ? opts.cleanUp : null; |
1627 let result = new _Future(); | 1627 let result = new _Future(); |
1628 let values = null; | 1628 let values = null; |
1629 let remaining = 0; | 1629 let remaining = 0; |
1630 let error = null; | 1630 let error = null; |
1631 let stackTrace = null; | 1631 let stackTrace = null; |
1632 // Function handleError: (dynamic, dynamic) → void | 1632 // Function handleError: (dynamic, dynamic) → void |
1633 function handleError(theError, theStackTrace) { | 1633 function handleError(theError, theStackTrace) { |
1634 remaining = dart.notNull(remaining) - 1; | 1634 remaining = dart.notNull(remaining) - 1; |
1635 if (values !== null) { | 1635 if (values !== null) { |
1636 if (cleanUp !== null) { | 1636 if (cleanUp !== null) { |
(...skipping 10 matching lines...) Expand all Loading... |
1647 result._completeError(theError, dart.as(theStackTrace, core.StackT
race)); | 1647 result._completeError(theError, dart.as(theStackTrace, core.StackT
race)); |
1648 } else { | 1648 } else { |
1649 error = theError; | 1649 error = theError; |
1650 stackTrace = dart.as(theStackTrace, core.StackTrace); | 1650 stackTrace = dart.as(theStackTrace, core.StackTrace); |
1651 } | 1651 } |
1652 } else if (remaining === 0 && !dart.notNull(eagerError)) { | 1652 } else if (remaining === 0 && !dart.notNull(eagerError)) { |
1653 result._completeError(error, stackTrace); | 1653 result._completeError(error, stackTrace); |
1654 } | 1654 } |
1655 } | 1655 } |
1656 for (let future of futures) { | 1656 for (let future of futures) { |
1657 let pos = (($tmp) => remaining = dart.notNull($tmp) + 1, $tmp)(remaini
ng); | 1657 let pos = ((x) => remaining = dart.notNull(x$) + 1, x$)(remaining); |
1658 future.then(((value) => { | 1658 future.then(((value) => { |
1659 remaining = dart.notNull(remaining) - 1; | 1659 remaining = dart.notNull(remaining) - 1; |
1660 if (values !== null) { | 1660 if (values !== null) { |
1661 values.set(pos, value); | 1661 values.set(pos, value); |
1662 if (remaining === 0) { | 1662 if (remaining === 0) { |
1663 result._completeWithValue(values); | 1663 result._completeWithValue(values); |
1664 } | 1664 } |
1665 } else { | 1665 } else { |
1666 if (dart.notNull(cleanUp !== null) && dart.notNull(value !== null)
) { | 1666 if (dart.notNull(cleanUp !== null) && dart.notNull(value !== null)
) { |
1667 new Future.sync(() => { | 1667 new Future.sync(() => { |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1899 let _isComplete = Symbol('_isComplete'); | 1899 let _isComplete = Symbol('_isComplete'); |
1900 let _hasValue = Symbol('_hasValue'); | 1900 let _hasValue = Symbol('_hasValue'); |
1901 let _hasError = Symbol('_hasError'); | 1901 let _hasError = Symbol('_hasError'); |
1902 let _markPendingCompletion = Symbol('_markPendingCompletion'); | 1902 let _markPendingCompletion = Symbol('_markPendingCompletion'); |
1903 let _value = Symbol('_value'); | 1903 let _value = Symbol('_value'); |
1904 let _error = Symbol('_error'); | 1904 let _error = Symbol('_error'); |
1905 let _setValue = Symbol('_setValue'); | 1905 let _setValue = Symbol('_setValue'); |
1906 let _setErrorObject = Symbol('_setErrorObject'); | 1906 let _setErrorObject = Symbol('_setErrorObject'); |
1907 let _setError = Symbol('_setError'); | 1907 let _setError = Symbol('_setError'); |
1908 let _removeListeners = Symbol('_removeListeners'); | 1908 let _removeListeners = Symbol('_removeListeners'); |
1909 let _chainForeignFuture = Symbol('_chainForeignFuture'); | 1909 let _chainForeignFuture$ = Symbol('_chainForeignFuture'); |
1910 let _chainCoreFuture = Symbol('_chainCoreFuture'); | 1910 let _chainCoreFuture$ = Symbol('_chainCoreFuture'); |
1911 let _completeWithValue = Symbol('_completeWithValue'); | 1911 let _completeWithValue = Symbol('_completeWithValue'); |
1912 let _propagateToListeners = Symbol('_propagateToListeners'); | 1912 let _propagateToListeners$ = Symbol('_propagateToListeners'); |
1913 let _Future$ = dart.generic(function(T) { | 1913 let _Future$ = dart.generic(function(T) { |
1914 class _Future extends core.Object { | 1914 class _Future extends core.Object { |
1915 _Future() { | 1915 _Future() { |
1916 this[_zone] = Zone.current; | 1916 this[_zone] = Zone.current; |
1917 this[_state] = _Future._INCOMPLETE; | 1917 this[_state] = _Future._INCOMPLETE; |
1918 this[_resultOrListeners] = null; | 1918 this[_resultOrListeners] = null; |
1919 } | 1919 } |
1920 _Future$immediate(value) { | 1920 _Future$immediate(value) { |
1921 this[_zone] = Zone.current; | 1921 this[_zone] = Zone.current; |
1922 this[_state] = _Future._INCOMPLETE; | 1922 this[_state] = _Future._INCOMPLETE; |
(...skipping 25 matching lines...) Expand all Loading... |
1948 } | 1948 } |
1949 set [_isChained](value) { | 1949 set [_isChained](value) { |
1950 if (value) { | 1950 if (value) { |
1951 dart.assert(!dart.notNull(this[_isComplete])); | 1951 dart.assert(!dart.notNull(this[_isComplete])); |
1952 this[_state] = _Future._CHAINED; | 1952 this[_state] = _Future._CHAINED; |
1953 } else { | 1953 } else { |
1954 dart.assert(this[_isChained]); | 1954 dart.assert(this[_isChained]); |
1955 this[_state] = _Future._INCOMPLETE; | 1955 this[_state] = _Future._INCOMPLETE; |
1956 } | 1956 } |
1957 } | 1957 } |
1958 then(f, opt$) { | 1958 then(f, opts) { |
1959 let onError = opt$ && 'onError' in opt$ ? opt$.onError : null; | 1959 let onError = opts && 'onError' in opts ? opts.onError : null; |
1960 let result = new _Future(); | 1960 let result = new _Future(); |
1961 if (!dart.notNull(core.identical(result[_zone], _ROOT_ZONE))) { | 1961 if (!dart.notNull(core.identical(result[_zone], _ROOT_ZONE))) { |
1962 f = dart.closureWrap(result[_zone].registerUnaryCallback(f), "(T) → dy
namic"); | 1962 f = dart.closureWrap(result[_zone].registerUnaryCallback(f), "(T) → dy
namic"); |
1963 if (onError !== null) { | 1963 if (onError !== null) { |
1964 onError = _registerErrorHandler(onError, result[_zone]); | 1964 onError = _registerErrorHandler(onError, result[_zone]); |
1965 } | 1965 } |
1966 } | 1966 } |
1967 this[_addListener](new _FutureListener.then(result, f, onError)); | 1967 this[_addListener](new _FutureListener.then(result, f, onError)); |
1968 return result; | 1968 return result; |
1969 } | 1969 } |
1970 catchError(onError, opt$) { | 1970 catchError(onError, opts) { |
1971 let test = opt$ && 'test' in opt$ ? opt$.test : null; | 1971 let test = opts && 'test' in opts ? opts.test : null; |
1972 let result = new _Future(); | 1972 let result = new _Future(); |
1973 if (!dart.notNull(core.identical(result[_zone], _ROOT_ZONE))) { | 1973 if (!dart.notNull(core.identical(result[_zone], _ROOT_ZONE))) { |
1974 onError = _registerErrorHandler(onError, result[_zone]); | 1974 onError = _registerErrorHandler(onError, result[_zone]); |
1975 if (test !== null) | 1975 if (test !== null) |
1976 test = dart.closureWrap(result[_zone].registerUnaryCallback(test), "
(dynamic) → bool"); | 1976 test = dart.closureWrap(result[_zone].registerUnaryCallback(test), "
(dynamic) → bool"); |
1977 } | 1977 } |
1978 this[_addListener](new _FutureListener.catchError(result, onError, test)
); | 1978 this[_addListener](new _FutureListener.catchError(result, onError, test)
); |
1979 return result; | 1979 return result; |
1980 } | 1980 } |
1981 whenComplete(action) { | 1981 whenComplete(action) { |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2032 this[_resultOrListeners] = null; | 2032 this[_resultOrListeners] = null; |
2033 let prev = null; | 2033 let prev = null; |
2034 while (current !== null) { | 2034 while (current !== null) { |
2035 let next = current[_nextListener]; | 2035 let next = current[_nextListener]; |
2036 current[_nextListener] = prev; | 2036 current[_nextListener] = prev; |
2037 prev = current; | 2037 prev = current; |
2038 current = next; | 2038 current = next; |
2039 } | 2039 } |
2040 return prev; | 2040 return prev; |
2041 } | 2041 } |
2042 static [_chainForeignFuture](source, target) { | 2042 static [_chainForeignFuture$](source, target) { |
2043 dart.assert(!dart.notNull(target[_isComplete])); | 2043 dart.assert(!dart.notNull(target[_isComplete])); |
2044 dart.assert(!dart.is(source, _Future)); | 2044 dart.assert(!dart.is(source, _Future)); |
2045 target[_isChained] = true; | 2045 target[_isChained] = true; |
2046 source.then(((value) => { | 2046 source.then(((value) => { |
2047 dart.assert(target[_isChained]); | 2047 dart.assert(target[_isChained]); |
2048 target._completeWithValue(value); | 2048 target._completeWithValue(value); |
2049 }).bind(this), {onError: ((error, stackTrace) => { | 2049 }).bind(this), {onError: ((error, stackTrace) => { |
2050 if (stackTrace === void 0) | 2050 if (stackTrace === void 0) |
2051 stackTrace = null; | 2051 stackTrace = null; |
2052 dart.assert(target[_isChained]); | 2052 dart.assert(target[_isChained]); |
2053 target._completeError(error, dart.as(stackTrace, core.StackTrace)); | 2053 target._completeError(error, dart.as(stackTrace, core.StackTrace)); |
2054 }).bind(this)}); | 2054 }).bind(this)}); |
2055 } | 2055 } |
2056 static [_chainCoreFuture](source, target) { | 2056 static [_chainCoreFuture$](source, target) { |
2057 dart.assert(!dart.notNull(target[_isComplete])); | 2057 dart.assert(!dart.notNull(target[_isComplete])); |
2058 dart.assert(dart.is(source, _Future)); | 2058 dart.assert(dart.is(source, _Future)); |
2059 target[_isChained] = true; | 2059 target[_isChained] = true; |
2060 let listener = new _FutureListener.chain(target); | 2060 let listener = new _FutureListener.chain(target); |
2061 if (source[_isComplete]) { | 2061 if (source[_isComplete]) { |
2062 _propagateToListeners(source, listener); | 2062 _propagateToListeners(source, listener); |
2063 } else { | 2063 } else { |
2064 source._addListener(listener); | 2064 source._addListener(listener); |
2065 } | 2065 } |
2066 } | 2066 } |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2120 this[_completeWithValue](value); | 2120 this[_completeWithValue](value); |
2121 }).bind(this)); | 2121 }).bind(this)); |
2122 } | 2122 } |
2123 [_asyncCompleteError](error, stackTrace) { | 2123 [_asyncCompleteError](error, stackTrace) { |
2124 dart.assert(!dart.notNull(this[_isComplete])); | 2124 dart.assert(!dart.notNull(this[_isComplete])); |
2125 this[_markPendingCompletion](); | 2125 this[_markPendingCompletion](); |
2126 this[_zone].scheduleMicrotask((() => { | 2126 this[_zone].scheduleMicrotask((() => { |
2127 this[_completeError](error, stackTrace); | 2127 this[_completeError](error, stackTrace); |
2128 }).bind(this)); | 2128 }).bind(this)); |
2129 } | 2129 } |
2130 static [_propagateToListeners](source, listeners) { | 2130 static [_propagateToListeners$](source, listeners) { |
2131 while (true) { | 2131 while (true) { |
2132 dart.assert(source[_isComplete]); | 2132 dart.assert(source[_isComplete]); |
2133 let hasError = source[_hasError]; | 2133 let hasError = source[_hasError]; |
2134 if (listeners === null) { | 2134 if (listeners === null) { |
2135 if (hasError) { | 2135 if (hasError) { |
2136 let asyncError = source[_error]; | 2136 let asyncError = source[_error]; |
2137 source[_zone].handleUncaughtError(asyncError.error, asyncError.sta
ckTrace); | 2137 source[_zone].handleUncaughtError(asyncError.error, asyncError.sta
ckTrace); |
2138 } | 2138 } |
2139 return; | 2139 return; |
2140 } | 2140 } |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2280 listeners = result._removeListeners(); | 2280 listeners = result._removeListeners(); |
2281 if (listenerHasValue) { | 2281 if (listenerHasValue) { |
2282 result._setValue(listenerValueOrError); | 2282 result._setValue(listenerValueOrError); |
2283 } else { | 2283 } else { |
2284 let asyncError = dart.as(listenerValueOrError, AsyncError); | 2284 let asyncError = dart.as(listenerValueOrError, AsyncError); |
2285 result._setErrorObject(asyncError); | 2285 result._setErrorObject(asyncError); |
2286 } | 2286 } |
2287 source = result; | 2287 source = result; |
2288 } | 2288 } |
2289 } | 2289 } |
2290 timeout(timeLimit, opt$) { | 2290 timeout(timeLimit, opts) { |
2291 let onTimeout = opt$ && 'onTimeout' in opt$ ? opt$.onTimeout : null; | 2291 let onTimeout = opts && 'onTimeout' in opts ? opts.onTimeout : null; |
2292 if (this[_isComplete]) | 2292 if (this[_isComplete]) |
2293 return new _Future.immediate(this); | 2293 return new _Future.immediate(this); |
2294 let result = new _Future(); | 2294 let result = new _Future(); |
2295 let timer = null; | 2295 let timer = null; |
2296 if (onTimeout === null) { | 2296 if (onTimeout === null) { |
2297 timer = new Timer(timeLimit, (() => { | 2297 timer = new Timer(timeLimit, (() => { |
2298 result._completeError(new TimeoutException("Future not completed", t
imeLimit)); | 2298 result._completeError(new TimeoutException("Future not completed", t
imeLimit)); |
2299 }).bind(this)); | 2299 }).bind(this)); |
2300 } else { | 2300 } else { |
2301 let zone = Zone.current; | 2301 let zone = Zone.current; |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2400 } | 2400 } |
2401 // Function scheduleMicrotask: (() → void) → void | 2401 // Function scheduleMicrotask: (() → void) → void |
2402 function scheduleMicrotask(callback) { | 2402 function scheduleMicrotask(callback) { |
2403 if (core.identical(_ROOT_ZONE, Zone.current)) { | 2403 if (core.identical(_ROOT_ZONE, Zone.current)) { |
2404 _rootScheduleMicrotask(null, null, _ROOT_ZONE, callback); | 2404 _rootScheduleMicrotask(null, null, _ROOT_ZONE, callback); |
2405 return; | 2405 return; |
2406 } | 2406 } |
2407 Zone.current.scheduleMicrotask(Zone.current.bindCallback(callback, {runGuard
ed: true})); | 2407 Zone.current.scheduleMicrotask(Zone.current.bindCallback(callback, {runGuard
ed: true})); |
2408 } | 2408 } |
2409 let _scheduleImmediate = Symbol('_scheduleImmediate'); | 2409 let _scheduleImmediate = Symbol('_scheduleImmediate'); |
2410 let _initializeScheduleImmediate = Symbol('_initializeScheduleImmediate'); | 2410 let _initializeScheduleImmediate$ = Symbol('_initializeScheduleImmediate'); |
2411 let _scheduleImmediateJsOverride = Symbol('_scheduleImmediateJsOverride'); | 2411 let _scheduleImmediateJsOverride$ = Symbol('_scheduleImmediateJsOverride'); |
2412 let _scheduleImmediateWithSetImmediate = Symbol('_scheduleImmediateWithSetImme
diate'); | 2412 let _scheduleImmediateWithSetImmediate$ = Symbol('_scheduleImmediateWithSetImm
ediate'); |
2413 let _scheduleImmediateWithTimer = Symbol('_scheduleImmediateWithTimer'); | 2413 let _scheduleImmediateWithTimer$ = Symbol('_scheduleImmediateWithTimer'); |
2414 class _AsyncRun extends core.Object { | 2414 class _AsyncRun extends core.Object { |
2415 static [_scheduleImmediate](callback) { | 2415 static [_scheduleImmediate](callback) { |
2416 dart.dinvokef(scheduleImmediateClosure, callback); | 2416 dart.dinvokef(scheduleImmediateClosure, callback); |
2417 } | 2417 } |
2418 static [_initializeScheduleImmediate]() { | 2418 static [_initializeScheduleImmediate$]() { |
2419 _js_helper.requiresPreamble(); | 2419 _js_helper.requiresPreamble(); |
2420 if (self.scheduleImmediate !== null) { | 2420 if (self.scheduleImmediate !== null) { |
2421 return _scheduleImmediateJsOverride; | 2421 return _scheduleImmediateJsOverride; |
2422 } | 2422 } |
2423 if (dart.notNull(self.MutationObserver !== null) && dart.notNull(self.docu
ment !== null)) { | 2423 if (dart.notNull(self.MutationObserver !== null) && dart.notNull(self.docu
ment !== null)) { |
2424 let div = self.document.createElement("div"); | 2424 let div = self.document.createElement("div"); |
2425 let span = self.document.createElement("span"); | 2425 let span = self.document.createElement("span"); |
2426 let storedCallback = null; | 2426 let storedCallback = null; |
2427 // Function internalCallback: (dynamic) → dynamic | 2427 // Function internalCallback: (dynamic) → dynamic |
2428 function internalCallback(_) { | 2428 function internalCallback(_) { |
2429 _isolate_helper.leaveJsAsync(); | 2429 _isolate_helper.leaveJsAsync(); |
2430 let f = storedCallback; | 2430 let f = storedCallback; |
2431 storedCallback = null; | 2431 storedCallback = null; |
2432 dart.dinvokef(f); | 2432 dart.dinvokef(f); |
2433 } | 2433 } |
2434 ; | 2434 ; |
2435 let observer = new self.MutationObserver(_js_helper.convertDartClosureTo
JS(internalCallback, 1)); | 2435 let observer = new self.MutationObserver(_js_helper.convertDartClosureTo
JS(internalCallback, 1)); |
2436 observer.observe(div, {childList: true}); | 2436 observer.observe(div, {childList: true}); |
2437 return (callback) => { | 2437 return (callback) => { |
2438 dart.assert(storedCallback === null); | 2438 dart.assert(storedCallback === null); |
2439 _isolate_helper.enterJsAsync(); | 2439 _isolate_helper.enterJsAsync(); |
2440 storedCallback = callback; | 2440 storedCallback = callback; |
2441 div.firstChild ? div.removeChild(span) : div.appendChild(span); | 2441 div.firstChild ? div.removeChild(span) : div.appendChild(span); |
2442 }; | 2442 }; |
2443 } else if (self.setImmediate !== null) { | 2443 } else if (self.setImmediate !== null) { |
2444 return _scheduleImmediateWithSetImmediate; | 2444 return _scheduleImmediateWithSetImmediate; |
2445 } | 2445 } |
2446 return _scheduleImmediateWithTimer; | 2446 return _scheduleImmediateWithTimer; |
2447 } | 2447 } |
2448 static [_scheduleImmediateJsOverride](callback) { | 2448 static [_scheduleImmediateJsOverride$](callback) { |
2449 // Function internalCallback: () → dynamic | 2449 // Function internalCallback: () → dynamic |
2450 function internalCallback() { | 2450 function internalCallback() { |
2451 _isolate_helper.leaveJsAsync(); | 2451 _isolate_helper.leaveJsAsync(); |
2452 callback(); | 2452 callback(); |
2453 } | 2453 } |
2454 ; | 2454 ; |
2455 _isolate_helper.enterJsAsync(); | 2455 _isolate_helper.enterJsAsync(); |
2456 self.scheduleImmediate(_js_helper.convertDartClosureToJS(internalCallback,
0)); | 2456 self.scheduleImmediate(_js_helper.convertDartClosureToJS(internalCallback,
0)); |
2457 } | 2457 } |
2458 static [_scheduleImmediateWithSetImmediate](callback) { | 2458 static [_scheduleImmediateWithSetImmediate$](callback) { |
2459 // Function internalCallback: () → dynamic | 2459 // Function internalCallback: () → dynamic |
2460 function internalCallback() { | 2460 function internalCallback() { |
2461 _isolate_helper.leaveJsAsync(); | 2461 _isolate_helper.leaveJsAsync(); |
2462 callback(); | 2462 callback(); |
2463 } | 2463 } |
2464 ; | 2464 ; |
2465 _isolate_helper.enterJsAsync(); | 2465 _isolate_helper.enterJsAsync(); |
2466 self.setImmediate(_js_helper.convertDartClosureToJS(internalCallback, 0)); | 2466 self.setImmediate(_js_helper.convertDartClosureToJS(internalCallback, 0)); |
2467 } | 2467 } |
2468 static [_scheduleImmediateWithTimer](callback) { | 2468 static [_scheduleImmediateWithTimer$](callback) { |
2469 Timer._createTimer(core.Duration.ZERO, callback); | 2469 Timer._createTimer(core.Duration.ZERO, callback); |
2470 } | 2470 } |
2471 } | 2471 } |
2472 dart.defineLazyProperties(_AsyncRun, { | 2472 dart.defineLazyProperties(_AsyncRun, { |
2473 get scheduleImmediateClosure() { | 2473 get scheduleImmediateClosure() { |
2474 return _initializeScheduleImmediate(); | 2474 return _initializeScheduleImmediate(); |
2475 } | 2475 } |
2476 }); | 2476 }); |
2477 let StreamSubscription$ = dart.generic(function(T) { | 2477 let StreamSubscription$ = dart.generic(function(T) { |
2478 class StreamSubscription extends core.Object { | 2478 class StreamSubscription extends core.Object { |
2479 } | 2479 } |
2480 return StreamSubscription; | 2480 return StreamSubscription; |
2481 }); | 2481 }); |
2482 let StreamSubscription = StreamSubscription$(dart.dynamic); | 2482 let StreamSubscription = StreamSubscription$(dart.dynamic); |
2483 let EventSink$ = dart.generic(function(T) { | 2483 let EventSink$ = dart.generic(function(T) { |
2484 class EventSink extends core.Object { | 2484 class EventSink extends core.Object { |
2485 } | 2485 } |
2486 return EventSink; | 2486 return EventSink; |
2487 }); | 2487 }); |
2488 let EventSink = EventSink$(dart.dynamic); | 2488 let EventSink = EventSink$(dart.dynamic); |
2489 let _stream = Symbol('_stream'); | 2489 let _stream = Symbol('_stream'); |
2490 let StreamView$ = dart.generic(function(T) { | 2490 let StreamView$ = dart.generic(function(T) { |
2491 class StreamView extends Stream$(T) { | 2491 class StreamView extends Stream$(T) { |
2492 StreamView($_stream) { | 2492 StreamView(stream$) { |
2493 this[_stream] = $_stream; | 2493 this[_stream] = stream$; |
2494 super.Stream(); | 2494 super.Stream(); |
2495 } | 2495 } |
2496 get isBroadcast() { | 2496 get isBroadcast() { |
2497 return this[_stream].isBroadcast; | 2497 return this[_stream].isBroadcast; |
2498 } | 2498 } |
2499 asBroadcastStream(opt$) { | 2499 asBroadcastStream(opts) { |
2500 let onListen = opt$ && 'onListen' in opt$ ? opt$.onListen : null; | 2500 let onListen = opts && 'onListen' in opts ? opts.onListen : null; |
2501 let onCancel = opt$ && 'onCancel' in opt$ ? opt$.onCancel : null; | 2501 let onCancel = opts && 'onCancel' in opts ? opts.onCancel : null; |
2502 return this[_stream].asBroadcastStream({onListen: onListen, onCancel: on
Cancel}); | 2502 return this[_stream].asBroadcastStream({onListen: onListen, onCancel: on
Cancel}); |
2503 } | 2503 } |
2504 listen(onData, opt$) { | 2504 listen(onData, opts) { |
2505 let onError = opt$ && 'onError' in opt$ ? opt$.onError : null; | 2505 let onError = opts && 'onError' in opts ? opts.onError : null; |
2506 let onDone = opt$ && 'onDone' in opt$ ? opt$.onDone : null; | 2506 let onDone = opts && 'onDone' in opts ? opts.onDone : null; |
2507 let cancelOnError = opt$ && 'cancelOnError' in opt$ ? opt$.cancelOnError
: null; | 2507 let cancelOnError = opts && 'cancelOnError' in opts ? opts.cancelOnError
: null; |
2508 return this[_stream].listen(onData, {onError: onError, onDone: onDone, c
ancelOnError: cancelOnError}); | 2508 return this[_stream].listen(onData, {onError: onError, onDone: onDone, c
ancelOnError: cancelOnError}); |
2509 } | 2509 } |
2510 } | 2510 } |
2511 return StreamView; | 2511 return StreamView; |
2512 }); | 2512 }); |
2513 let StreamView = StreamView$(dart.dynamic); | 2513 let StreamView = StreamView$(dart.dynamic); |
2514 let StreamConsumer$ = dart.generic(function(S) { | 2514 let StreamConsumer$ = dart.generic(function(S) { |
2515 class StreamConsumer extends core.Object { | 2515 class StreamConsumer extends core.Object { |
2516 } | 2516 } |
2517 return StreamConsumer; | 2517 return StreamConsumer; |
2518 }); | 2518 }); |
2519 let StreamConsumer = StreamConsumer$(dart.dynamic); | 2519 let StreamConsumer = StreamConsumer$(dart.dynamic); |
2520 let StreamSink$ = dart.generic(function(S) { | 2520 let StreamSink$ = dart.generic(function(S) { |
2521 class StreamSink extends core.Object { | 2521 class StreamSink extends core.Object { |
2522 } | 2522 } |
2523 return StreamSink; | 2523 return StreamSink; |
2524 }); | 2524 }); |
2525 let StreamSink = StreamSink$(dart.dynamic); | 2525 let StreamSink = StreamSink$(dart.dynamic); |
2526 let StreamTransformer$ = dart.generic(function(S, T) { | 2526 let StreamTransformer$ = dart.generic(function(S, T) { |
2527 class StreamTransformer extends core.Object { | 2527 class StreamTransformer extends core.Object { |
2528 StreamTransformer(transformer) { | 2528 StreamTransformer(transformer) { |
2529 return new _StreamSubscriptionTransformer(transformer); | 2529 return new _StreamSubscriptionTransformer(transformer); |
2530 } | 2530 } |
2531 StreamTransformer$fromHandlers(opt$) { | 2531 StreamTransformer$fromHandlers(opts) { |
2532 return new _StreamHandlerTransformer(opt$); | 2532 return new _StreamHandlerTransformer(opts); |
2533 } | 2533 } |
2534 } | 2534 } |
2535 dart.defineNamedConstructor(StreamTransformer, 'fromHandlers'); | 2535 dart.defineNamedConstructor(StreamTransformer, 'fromHandlers'); |
2536 return StreamTransformer; | 2536 return StreamTransformer; |
2537 }); | 2537 }); |
2538 let StreamTransformer = StreamTransformer$(dart.dynamic, dart.dynamic); | 2538 let StreamTransformer = StreamTransformer$(dart.dynamic, dart.dynamic); |
2539 let StreamIterator$ = dart.generic(function(T) { | 2539 let StreamIterator$ = dart.generic(function(T) { |
2540 class StreamIterator extends core.Object { | 2540 class StreamIterator extends core.Object { |
2541 StreamIterator(stream) { | 2541 StreamIterator(stream) { |
2542 return new _StreamIteratorImpl(stream); | 2542 return new _StreamIteratorImpl(stream); |
2543 } | 2543 } |
2544 } | 2544 } |
2545 return StreamIterator; | 2545 return StreamIterator; |
2546 }); | 2546 }); |
2547 let StreamIterator = StreamIterator$(dart.dynamic); | 2547 let StreamIterator = StreamIterator$(dart.dynamic); |
2548 let _ControllerEventSinkWrapper$ = dart.generic(function(T) { | 2548 let _ControllerEventSinkWrapper$ = dart.generic(function(T) { |
2549 class _ControllerEventSinkWrapper extends core.Object { | 2549 class _ControllerEventSinkWrapper extends core.Object { |
2550 _ControllerEventSinkWrapper($_sink) { | 2550 _ControllerEventSinkWrapper(sink$) { |
2551 this[_sink] = $_sink; | 2551 this[_sink] = sink$; |
2552 } | 2552 } |
2553 add(data) { | 2553 add(data) { |
2554 this[_sink].add(data); | 2554 this[_sink].add(data); |
2555 } | 2555 } |
2556 addError(error, stackTrace) { | 2556 addError(error, stackTrace) { |
2557 if (stackTrace === void 0) | 2557 if (stackTrace === void 0) |
2558 stackTrace = null; | 2558 stackTrace = null; |
2559 this[_sink].addError(error, stackTrace); | 2559 this[_sink].addError(error, stackTrace); |
2560 } | 2560 } |
2561 close() { | 2561 close() { |
2562 this[_sink].close(); | 2562 this[_sink].close(); |
2563 } | 2563 } |
2564 } | 2564 } |
2565 return _ControllerEventSinkWrapper; | 2565 return _ControllerEventSinkWrapper; |
2566 }); | 2566 }); |
2567 let _ControllerEventSinkWrapper = _ControllerEventSinkWrapper$(dart.dynamic); | 2567 let _ControllerEventSinkWrapper = _ControllerEventSinkWrapper$(dart.dynamic); |
2568 let StreamController$ = dart.generic(function(T) { | 2568 let StreamController$ = dart.generic(function(T) { |
2569 class StreamController extends core.Object { | 2569 class StreamController extends core.Object { |
2570 StreamController(opt$) { | 2570 StreamController(opts) { |
2571 let onListen = opt$ && 'onListen' in opt$ ? opt$.onListen : null; | 2571 let onListen = opts && 'onListen' in opts ? opts.onListen : null; |
2572 let onPause = opt$ && 'onPause' in opt$ ? opt$.onPause : null; | 2572 let onPause = opts && 'onPause' in opts ? opts.onPause : null; |
2573 let onResume = opt$ && 'onResume' in opt$ ? opt$.onResume : null; | 2573 let onResume = opts && 'onResume' in opts ? opts.onResume : null; |
2574 let onCancel = opt$ && 'onCancel' in opt$ ? opt$.onCancel : null; | 2574 let onCancel = opts && 'onCancel' in opts ? opts.onCancel : null; |
2575 let sync = opt$ && 'sync' in opt$ ? opt$.sync : false; | 2575 let sync = opts && 'sync' in opts ? opts.sync : false; |
2576 if (dart.notNull(onListen === null) && dart.notNull(onPause === null) &&
dart.notNull(onResume === null) && dart.notNull(onCancel === null)) { | 2576 if (dart.notNull(onListen === null) && dart.notNull(onPause === null) &&
dart.notNull(onResume === null) && dart.notNull(onCancel === null)) { |
2577 return dart.as(sync ? new _NoCallbackSyncStreamController() : new _NoC
allbackAsyncStreamController(), StreamController$(T)); | 2577 return dart.as(sync ? new _NoCallbackSyncStreamController() : new _NoC
allbackAsyncStreamController(), StreamController$(T)); |
2578 } | 2578 } |
2579 return sync ? new _SyncStreamController(onListen, onPause, onResume, onC
ancel) : new _AsyncStreamController(onListen, onPause, onResume, onCancel); | 2579 return sync ? new _SyncStreamController(onListen, onPause, onResume, onC
ancel) : new _AsyncStreamController(onListen, onPause, onResume, onCancel); |
2580 } | 2580 } |
2581 StreamController$broadcast(opt$) { | 2581 StreamController$broadcast(opts) { |
2582 let onListen = opt$ && 'onListen' in opt$ ? opt$.onListen : null; | 2582 let onListen = opts && 'onListen' in opts ? opts.onListen : null; |
2583 let onCancel = opt$ && 'onCancel' in opt$ ? opt$.onCancel : null; | 2583 let onCancel = opts && 'onCancel' in opts ? opts.onCancel : null; |
2584 let sync = opt$ && 'sync' in opt$ ? opt$.sync : false; | 2584 let sync = opts && 'sync' in opts ? opts.sync : false; |
2585 return sync ? new _SyncBroadcastStreamController(onListen, onCancel) : n
ew _AsyncBroadcastStreamController(onListen, onCancel); | 2585 return sync ? new _SyncBroadcastStreamController(onListen, onCancel) : n
ew _AsyncBroadcastStreamController(onListen, onCancel); |
2586 } | 2586 } |
2587 } | 2587 } |
2588 dart.defineNamedConstructor(StreamController, 'broadcast'); | 2588 dart.defineNamedConstructor(StreamController, 'broadcast'); |
2589 return StreamController; | 2589 return StreamController; |
2590 }); | 2590 }); |
2591 let StreamController = StreamController$(dart.dynamic); | 2591 let StreamController = StreamController$(dart.dynamic); |
2592 let _StreamControllerLifecycle$ = dart.generic(function(T) { | 2592 let _StreamControllerLifecycle$ = dart.generic(function(T) { |
2593 class _StreamControllerLifecycle extends core.Object { | 2593 class _StreamControllerLifecycle extends core.Object { |
2594 [_recordPause](subscription) {} | 2594 [_recordPause](subscription) {} |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2670 } | 2670 } |
2671 return dart.as(this[_varData], _ControllerSubscription); | 2671 return dart.as(this[_varData], _ControllerSubscription); |
2672 } | 2672 } |
2673 [_badEventState]() { | 2673 [_badEventState]() { |
2674 if (this.isClosed) { | 2674 if (this.isClosed) { |
2675 return new core.StateError("Cannot add event after closing"); | 2675 return new core.StateError("Cannot add event after closing"); |
2676 } | 2676 } |
2677 dart.assert(this[_isAddingStream]); | 2677 dart.assert(this[_isAddingStream]); |
2678 return new core.StateError("Cannot add event while adding a stream"); | 2678 return new core.StateError("Cannot add event while adding a stream"); |
2679 } | 2679 } |
2680 addStream(source, opt$) { | 2680 addStream(source, opts) { |
2681 let cancelOnError = opt$ && 'cancelOnError' in opt$ ? opt$.cancelOnError
: true; | 2681 let cancelOnError = opts && 'cancelOnError' in opts ? opts.cancelOnError
: true; |
2682 if (!dart.notNull(this[_mayAddEvent])) | 2682 if (!dart.notNull(this[_mayAddEvent])) |
2683 throw this[_badEventState](); | 2683 throw this[_badEventState](); |
2684 if (this[_isCanceled]) | 2684 if (this[_isCanceled]) |
2685 return new _Future.immediate(null); | 2685 return new _Future.immediate(null); |
2686 let addState = new _StreamControllerAddStreamState(this, this[_varData],
source, cancelOnError); | 2686 let addState = new _StreamControllerAddStreamState(this, this[_varData],
source, cancelOnError); |
2687 this[_varData] = addState; | 2687 this[_varData] = addState; |
2688 this[_state] = _StreamController._STATE_ADDSTREAM; | 2688 this[_state] = _StreamController._STATE_ADDSTREAM; |
2689 return addState.addStreamFuture; | 2689 return addState.addStreamFuture; |
2690 } | 2690 } |
2691 get done() { | 2691 get done() { |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2780 result = addState.cancel(); | 2780 result = addState.cancel(); |
2781 } | 2781 } |
2782 this[_varData] = null; | 2782 this[_varData] = null; |
2783 this[_state] = dart.notNull(this[_state]) & ~(dart.notNull(_StreamContro
ller._STATE_SUBSCRIBED) | dart.notNull(_StreamController._STATE_ADDSTREAM)) | da
rt.notNull(_StreamController._STATE_CANCELED); | 2783 this[_state] = dart.notNull(this[_state]) & ~(dart.notNull(_StreamContro
ller._STATE_SUBSCRIBED) | dart.notNull(_StreamController._STATE_ADDSTREAM)) | da
rt.notNull(_StreamController._STATE_CANCELED); |
2784 if (this[_onCancel] !== null) { | 2784 if (this[_onCancel] !== null) { |
2785 if (result === null) { | 2785 if (result === null) { |
2786 try { | 2786 try { |
2787 result = dart.as(this[_onCancel](), Future); | 2787 result = dart.as(this[_onCancel](), Future); |
2788 } catch (e) { | 2788 } catch (e) { |
2789 let s = dart.stackTrace(e); | 2789 let s = dart.stackTrace(e); |
2790 result = ((_) => { | 2790 result = ((_$) => { |
2791 _._asyncCompleteError(e, s); | 2791 _$._asyncCompleteError(e, s); |
2792 return _; | 2792 return _$; |
2793 }).bind(this)(new _Future()); | 2793 }).bind(this)(new _Future()); |
2794 } | 2794 } |
2795 | 2795 |
2796 } else { | 2796 } else { |
2797 result = result.whenComplete(this[_onCancel]); | 2797 result = result.whenComplete(this[_onCancel]); |
2798 } | 2798 } |
2799 } | 2799 } |
2800 // Function complete: () → void | 2800 // Function complete: () → void |
2801 function complete() { | 2801 function complete() { |
2802 if (dart.notNull(this[_doneFuture] !== null) && dart.notNull(this[_don
eFuture][_mayComplete])) { | 2802 if (dart.notNull(this[_doneFuture] !== null) && dart.notNull(this[_don
eFuture][_mayComplete])) { |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2859 } | 2859 } |
2860 [_sendDone]() { | 2860 [_sendDone]() { |
2861 this[_subscription]._addPending(new _DelayedDone()); | 2861 this[_subscription]._addPending(new _DelayedDone()); |
2862 } | 2862 } |
2863 } | 2863 } |
2864 return _AsyncStreamControllerDispatch; | 2864 return _AsyncStreamControllerDispatch; |
2865 }); | 2865 }); |
2866 let _AsyncStreamControllerDispatch = _AsyncStreamControllerDispatch$(dart.dyna
mic); | 2866 let _AsyncStreamControllerDispatch = _AsyncStreamControllerDispatch$(dart.dyna
mic); |
2867 let _AsyncStreamController$ = dart.generic(function(T) { | 2867 let _AsyncStreamController$ = dart.generic(function(T) { |
2868 class _AsyncStreamController extends dart.mixin(_StreamController$(T), _Asyn
cStreamControllerDispatch$(T)) { | 2868 class _AsyncStreamController extends dart.mixin(_StreamController$(T), _Asyn
cStreamControllerDispatch$(T)) { |
2869 _AsyncStreamController($_onListen, $_onPause, $_onResume, $_onCancel) { | 2869 _AsyncStreamController(onListen$, onPause$, onResume$, onCancel$) { |
2870 this[_onListen] = $_onListen; | 2870 this[_onListen] = onListen$; |
2871 this[_onPause] = $_onPause; | 2871 this[_onPause] = onPause$; |
2872 this[_onResume] = $_onResume; | 2872 this[_onResume] = onResume$; |
2873 this[_onCancel] = $_onCancel; | 2873 this[_onCancel] = onCancel$; |
2874 super._StreamController(); | 2874 super._StreamController(); |
2875 } | 2875 } |
2876 } | 2876 } |
2877 return _AsyncStreamController; | 2877 return _AsyncStreamController; |
2878 }); | 2878 }); |
2879 let _AsyncStreamController = _AsyncStreamController$(dart.dynamic); | 2879 let _AsyncStreamController = _AsyncStreamController$(dart.dynamic); |
2880 let _SyncStreamController$ = dart.generic(function(T) { | 2880 let _SyncStreamController$ = dart.generic(function(T) { |
2881 class _SyncStreamController extends dart.mixin(_StreamController$(T), _SyncS
treamControllerDispatch$(T)) { | 2881 class _SyncStreamController extends dart.mixin(_StreamController$(T), _SyncS
treamControllerDispatch$(T)) { |
2882 _SyncStreamController($_onListen, $_onPause, $_onResume, $_onCancel) { | 2882 _SyncStreamController(onListen$, onPause$, onResume$, onCancel$) { |
2883 this[_onListen] = $_onListen; | 2883 this[_onListen] = onListen$; |
2884 this[_onPause] = $_onPause; | 2884 this[_onPause] = onPause$; |
2885 this[_onResume] = $_onResume; | 2885 this[_onResume] = onResume$; |
2886 this[_onCancel] = $_onCancel; | 2886 this[_onCancel] = onCancel$; |
2887 super._StreamController(); | 2887 super._StreamController(); |
2888 } | 2888 } |
2889 } | 2889 } |
2890 return _SyncStreamController; | 2890 return _SyncStreamController; |
2891 }); | 2891 }); |
2892 let _SyncStreamController = _SyncStreamController$(dart.dynamic); | 2892 let _SyncStreamController = _SyncStreamController$(dart.dynamic); |
2893 class _NoCallbacks extends core.Object { | 2893 class _NoCallbacks extends core.Object { |
2894 get [_onListen]() { | 2894 get [_onListen]() { |
2895 return null; | 2895 return null; |
2896 } | 2896 } |
(...skipping 22 matching lines...) Expand all Loading... |
2919 return null; | 2919 return null; |
2920 } catch (e) { | 2920 } catch (e) { |
2921 let s = dart.stackTrace(e); | 2921 let s = dart.stackTrace(e); |
2922 Zone.current.handleUncaughtError(e, s); | 2922 Zone.current.handleUncaughtError(e, s); |
2923 } | 2923 } |
2924 | 2924 |
2925 } | 2925 } |
2926 let _target = Symbol('_target'); | 2926 let _target = Symbol('_target'); |
2927 let _StreamSinkWrapper$ = dart.generic(function(T) { | 2927 let _StreamSinkWrapper$ = dart.generic(function(T) { |
2928 class _StreamSinkWrapper extends core.Object { | 2928 class _StreamSinkWrapper extends core.Object { |
2929 _StreamSinkWrapper($_target) { | 2929 _StreamSinkWrapper(target$) { |
2930 this[_target] = $_target; | 2930 this[_target] = target$; |
2931 } | 2931 } |
2932 add(data) { | 2932 add(data) { |
2933 this[_target].add(data); | 2933 this[_target].add(data); |
2934 } | 2934 } |
2935 addError(error, stackTrace) { | 2935 addError(error, stackTrace) { |
2936 if (stackTrace === void 0) | 2936 if (stackTrace === void 0) |
2937 stackTrace = null; | 2937 stackTrace = null; |
2938 this[_target].addError(error, stackTrace); | 2938 this[_target].addError(error, stackTrace); |
2939 } | 2939 } |
2940 close() { | 2940 close() { |
2941 return this[_target].close(); | 2941 return this[_target].close(); |
2942 } | 2942 } |
2943 addStream(source, opt$) { | 2943 addStream(source, opts) { |
2944 let cancelOnError = opt$ && 'cancelOnError' in opt$ ? opt$.cancelOnError
: true; | 2944 let cancelOnError = opts && 'cancelOnError' in opts ? opts.cancelOnError
: true; |
2945 return this[_target].addStream(source, {cancelOnError: cancelOnError}); | 2945 return this[_target].addStream(source, {cancelOnError: cancelOnError}); |
2946 } | 2946 } |
2947 get done() { | 2947 get done() { |
2948 return this[_target].done; | 2948 return this[_target].done; |
2949 } | 2949 } |
2950 } | 2950 } |
2951 return _StreamSinkWrapper; | 2951 return _StreamSinkWrapper; |
2952 }); | 2952 }); |
2953 let _StreamSinkWrapper = _StreamSinkWrapper$(dart.dynamic); | 2953 let _StreamSinkWrapper = _StreamSinkWrapper$(dart.dynamic); |
2954 let _AddStreamState$ = dart.generic(function(T) { | 2954 let _AddStreamState$ = dart.generic(function(T) { |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3007 let _EventSink = _EventSink$(dart.dynamic); | 3007 let _EventSink = _EventSink$(dart.dynamic); |
3008 let _EventDispatch$ = dart.generic(function(T) { | 3008 let _EventDispatch$ = dart.generic(function(T) { |
3009 class _EventDispatch extends core.Object { | 3009 class _EventDispatch extends core.Object { |
3010 } | 3010 } |
3011 return _EventDispatch; | 3011 return _EventDispatch; |
3012 }); | 3012 }); |
3013 let _EventDispatch = _EventDispatch$(dart.dynamic); | 3013 let _EventDispatch = _EventDispatch$(dart.dynamic); |
3014 let _isUsed = Symbol('_isUsed'); | 3014 let _isUsed = Symbol('_isUsed'); |
3015 let _GeneratedStreamImpl$ = dart.generic(function(T) { | 3015 let _GeneratedStreamImpl$ = dart.generic(function(T) { |
3016 class _GeneratedStreamImpl extends _StreamImpl$(T) { | 3016 class _GeneratedStreamImpl extends _StreamImpl$(T) { |
3017 _GeneratedStreamImpl($_pending) { | 3017 _GeneratedStreamImpl(pending$) { |
3018 this[_pending] = $_pending; | 3018 this[_pending] = pending$; |
3019 this[_isUsed] = false; | 3019 this[_isUsed] = false; |
3020 super._StreamImpl(); | 3020 super._StreamImpl(); |
3021 } | 3021 } |
3022 [_createSubscription](onData, onError, onDone, cancelOnError) { | 3022 [_createSubscription](onData, onError, onDone, cancelOnError) { |
3023 if (this[_isUsed]) | 3023 if (this[_isUsed]) |
3024 throw new core.StateError("Stream has already been listened to."); | 3024 throw new core.StateError("Stream has already been listened to."); |
3025 this[_isUsed] = true; | 3025 this[_isUsed] = true; |
3026 return ((_) => { | 3026 return ((_$) => { |
3027 _._setPendingEvents(this[_pending]()); | 3027 _$._setPendingEvents(this[_pending]()); |
3028 return _; | 3028 return _$; |
3029 }).bind(this)(new _BufferingStreamSubscription(onData, onError, onDone,
cancelOnError)); | 3029 }).bind(this)(new _BufferingStreamSubscription(onData, onError, onDone,
cancelOnError)); |
3030 } | 3030 } |
3031 } | 3031 } |
3032 return _GeneratedStreamImpl; | 3032 return _GeneratedStreamImpl; |
3033 }); | 3033 }); |
3034 let _GeneratedStreamImpl = _GeneratedStreamImpl$(dart.dynamic); | 3034 let _GeneratedStreamImpl = _GeneratedStreamImpl$(dart.dynamic); |
3035 let _iterator = Symbol('_iterator'); | 3035 let _iterator = Symbol('_iterator'); |
3036 let _eventScheduled = Symbol('_eventScheduled'); | 3036 let _eventScheduled = Symbol('_eventScheduled'); |
3037 class _PendingEvents extends core.Object { | 3037 class _PendingEvents extends core.Object { |
3038 _PendingEvents() { | 3038 _PendingEvents() { |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3211 newNext[_previous] = this[_previous]; | 3211 newNext[_previous] = this[_previous]; |
3212 this[_previous][_next] = newNext; | 3212 this[_previous][_next] = newNext; |
3213 this[_previous] = newPrevious; | 3213 this[_previous] = newPrevious; |
3214 } | 3214 } |
3215 } | 3215 } |
3216 let _schedule = Symbol('_schedule'); | 3216 let _schedule = Symbol('_schedule'); |
3217 let _isSent = Symbol('_isSent'); | 3217 let _isSent = Symbol('_isSent'); |
3218 let _isScheduled = Symbol('_isScheduled'); | 3218 let _isScheduled = Symbol('_isScheduled'); |
3219 let _DoneStreamSubscription$ = dart.generic(function(T) { | 3219 let _DoneStreamSubscription$ = dart.generic(function(T) { |
3220 class _DoneStreamSubscription extends core.Object { | 3220 class _DoneStreamSubscription extends core.Object { |
3221 _DoneStreamSubscription($_onDone) { | 3221 _DoneStreamSubscription(onDone$) { |
3222 this[_onDone] = $_onDone; | 3222 this[_onDone] = onDone$; |
3223 this[_zone] = Zone.current; | 3223 this[_zone] = Zone.current; |
3224 this[_state] = 0; | 3224 this[_state] = 0; |
3225 this[_schedule](); | 3225 this[_schedule](); |
3226 } | 3226 } |
3227 get [_isSent]() { | 3227 get [_isSent]() { |
3228 return (dart.notNull(this[_state]) & dart.notNull(_DoneStreamSubscriptio
n._DONE_SENT)) !== 0; | 3228 return (dart.notNull(this[_state]) & dart.notNull(_DoneStreamSubscriptio
n._DONE_SENT)) !== 0; |
3229 } | 3229 } |
3230 get [_isScheduled]() { | 3230 get [_isScheduled]() { |
3231 return (dart.notNull(this[_state]) & dart.notNull(_DoneStreamSubscriptio
n._SCHEDULED)) !== 0; | 3231 return (dart.notNull(this[_state]) & dart.notNull(_DoneStreamSubscriptio
n._SCHEDULED)) !== 0; |
3232 } | 3232 } |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3288 let _DoneStreamSubscription = _DoneStreamSubscription$(dart.dynamic); | 3288 let _DoneStreamSubscription = _DoneStreamSubscription$(dart.dynamic); |
3289 let _source = Symbol('_source'); | 3289 let _source = Symbol('_source'); |
3290 let _onListenHandler = Symbol('_onListenHandler'); | 3290 let _onListenHandler = Symbol('_onListenHandler'); |
3291 let _onCancelHandler = Symbol('_onCancelHandler'); | 3291 let _onCancelHandler = Symbol('_onCancelHandler'); |
3292 let _cancelSubscription = Symbol('_cancelSubscription'); | 3292 let _cancelSubscription = Symbol('_cancelSubscription'); |
3293 let _pauseSubscription = Symbol('_pauseSubscription'); | 3293 let _pauseSubscription = Symbol('_pauseSubscription'); |
3294 let _resumeSubscription = Symbol('_resumeSubscription'); | 3294 let _resumeSubscription = Symbol('_resumeSubscription'); |
3295 let _isSubscriptionPaused = Symbol('_isSubscriptionPaused'); | 3295 let _isSubscriptionPaused = Symbol('_isSubscriptionPaused'); |
3296 let _AsBroadcastStream$ = dart.generic(function(T) { | 3296 let _AsBroadcastStream$ = dart.generic(function(T) { |
3297 class _AsBroadcastStream extends Stream$(T) { | 3297 class _AsBroadcastStream extends Stream$(T) { |
3298 _AsBroadcastStream($_source, onListenHandler, onCancelHandler) { | 3298 _AsBroadcastStream(source$, onListenHandler, onCancelHandler) { |
3299 this[_source] = $_source; | 3299 this[_source] = source$; |
3300 this[_onListenHandler] = dart.closureWrap(Zone.current.registerUnaryCall
back(onListenHandler), "(StreamSubscription<dynamic>) → void"); | 3300 this[_onListenHandler] = dart.closureWrap(Zone.current.registerUnaryCall
back(onListenHandler), "(StreamSubscription<dynamic>) → void"); |
3301 this[_onCancelHandler] = dart.closureWrap(Zone.current.registerUnaryCall
back(onCancelHandler), "(StreamSubscription<dynamic>) → void"); | 3301 this[_onCancelHandler] = dart.closureWrap(Zone.current.registerUnaryCall
back(onCancelHandler), "(StreamSubscription<dynamic>) → void"); |
3302 this[_zone] = Zone.current; | 3302 this[_zone] = Zone.current; |
3303 this[_controller] = null; | 3303 this[_controller] = null; |
3304 this[_subscription] = null; | 3304 this[_subscription] = null; |
3305 super.Stream(); | 3305 super.Stream(); |
3306 this[_controller] = new _AsBroadcastStreamController(this[_onListen], th
is[_onCancel]); | 3306 this[_controller] = new _AsBroadcastStreamController(this[_onListen], th
is[_onCancel]); |
3307 } | 3307 } |
3308 get isBroadcast() { | 3308 get isBroadcast() { |
3309 return true; | 3309 return true; |
3310 } | 3310 } |
3311 listen(onData, opt$) { | 3311 listen(onData, opts) { |
3312 let onError = opt$ && 'onError' in opt$ ? opt$.onError : null; | 3312 let onError = opts && 'onError' in opts ? opts.onError : null; |
3313 let onDone = opt$ && 'onDone' in opt$ ? opt$.onDone : null; | 3313 let onDone = opts && 'onDone' in opts ? opts.onDone : null; |
3314 let cancelOnError = opt$ && 'cancelOnError' in opt$ ? opt$.cancelOnError
: null; | 3314 let cancelOnError = opts && 'cancelOnError' in opts ? opts.cancelOnError
: null; |
3315 if (dart.notNull(this[_controller] === null) || dart.notNull(this[_contr
oller].isClosed)) { | 3315 if (dart.notNull(this[_controller] === null) || dart.notNull(this[_contr
oller].isClosed)) { |
3316 return new _DoneStreamSubscription(onDone); | 3316 return new _DoneStreamSubscription(onDone); |
3317 } | 3317 } |
3318 if (this[_subscription] === null) { | 3318 if (this[_subscription] === null) { |
3319 this[_subscription] = this[_source].listen(this[_controller].add, {onE
rror: this[_controller].addError, onDone: this[_controller].close}); | 3319 this[_subscription] = this[_source].listen(this[_controller].add, {onE
rror: this[_controller].addError, onDone: this[_controller].close}); |
3320 } | 3320 } |
3321 cancelOnError = core.identical(true, cancelOnError); | 3321 cancelOnError = core.identical(true, cancelOnError); |
3322 return this[_controller]._subscribe(onData, onError, onDone, cancelOnErr
or); | 3322 return this[_controller]._subscribe(onData, onError, onDone, cancelOnErr
or); |
3323 } | 3323 } |
3324 [_onCancel]() { | 3324 [_onCancel]() { |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3360 if (this[_subscription] === null) | 3360 if (this[_subscription] === null) |
3361 return false; | 3361 return false; |
3362 return this[_subscription].isPaused; | 3362 return this[_subscription].isPaused; |
3363 } | 3363 } |
3364 } | 3364 } |
3365 return _AsBroadcastStream; | 3365 return _AsBroadcastStream; |
3366 }); | 3366 }); |
3367 let _AsBroadcastStream = _AsBroadcastStream$(dart.dynamic); | 3367 let _AsBroadcastStream = _AsBroadcastStream$(dart.dynamic); |
3368 let _BroadcastSubscriptionWrapper$ = dart.generic(function(T) { | 3368 let _BroadcastSubscriptionWrapper$ = dart.generic(function(T) { |
3369 class _BroadcastSubscriptionWrapper extends core.Object { | 3369 class _BroadcastSubscriptionWrapper extends core.Object { |
3370 _BroadcastSubscriptionWrapper($_stream) { | 3370 _BroadcastSubscriptionWrapper(stream$) { |
3371 this[_stream] = $_stream; | 3371 this[_stream] = stream$; |
3372 } | 3372 } |
3373 onData(handleData) { | 3373 onData(handleData) { |
3374 throw new core.UnsupportedError("Cannot change handlers of asBroadcastSt
ream source subscription."); | 3374 throw new core.UnsupportedError("Cannot change handlers of asBroadcastSt
ream source subscription."); |
3375 } | 3375 } |
3376 onError(handleError) { | 3376 onError(handleError) { |
3377 throw new core.UnsupportedError("Cannot change handlers of asBroadcastSt
ream source subscription."); | 3377 throw new core.UnsupportedError("Cannot change handlers of asBroadcastSt
ream source subscription."); |
3378 } | 3378 } |
3379 onDone(handleDone) { | 3379 onDone(handleDone) { |
3380 throw new core.UnsupportedError("Cannot change handlers of asBroadcastSt
ream source subscription."); | 3380 throw new core.UnsupportedError("Cannot change handlers of asBroadcastSt
ream source subscription."); |
3381 } | 3381 } |
(...skipping 14 matching lines...) Expand all Loading... |
3396 } | 3396 } |
3397 asFuture(futureValue) { | 3397 asFuture(futureValue) { |
3398 if (futureValue === void 0) | 3398 if (futureValue === void 0) |
3399 futureValue = null; | 3399 futureValue = null; |
3400 throw new core.UnsupportedError("Cannot change handlers of asBroadcastSt
ream source subscription."); | 3400 throw new core.UnsupportedError("Cannot change handlers of asBroadcastSt
ream source subscription."); |
3401 } | 3401 } |
3402 } | 3402 } |
3403 return _BroadcastSubscriptionWrapper; | 3403 return _BroadcastSubscriptionWrapper; |
3404 }); | 3404 }); |
3405 let _BroadcastSubscriptionWrapper = _BroadcastSubscriptionWrapper$(dart.dynami
c); | 3405 let _BroadcastSubscriptionWrapper = _BroadcastSubscriptionWrapper$(dart.dynami
c); |
3406 let _current = Symbol('_current'); | 3406 let _current$ = Symbol('_current'); |
3407 let _futureOrPrefetch = Symbol('_futureOrPrefetch'); | 3407 let _futureOrPrefetch = Symbol('_futureOrPrefetch'); |
3408 let _clear = Symbol('_clear'); | 3408 let _clear = Symbol('_clear'); |
3409 let _StreamIteratorImpl$ = dart.generic(function(T) { | 3409 let _StreamIteratorImpl$ = dart.generic(function(T) { |
3410 class _StreamIteratorImpl extends core.Object { | 3410 class _StreamIteratorImpl extends core.Object { |
3411 _StreamIteratorImpl(stream) { | 3411 _StreamIteratorImpl(stream) { |
3412 this[_subscription] = null; | 3412 this[_subscription] = null; |
3413 this[_current] = null; | 3413 this[_current$] = null; |
3414 this[_futureOrPrefetch] = null; | 3414 this[_futureOrPrefetch] = null; |
3415 this[_state] = _StreamIteratorImpl._STATE_FOUND; | 3415 this[_state] = _StreamIteratorImpl._STATE_FOUND; |
3416 this[_subscription] = stream.listen(this[_onData], {onError: this[_onErr
or], onDone: this[_onDone], cancelOnError: true}); | 3416 this[_subscription] = stream.listen(this[_onData], {onError: this[_onErr
or], onDone: this[_onDone], cancelOnError: true}); |
3417 } | 3417 } |
3418 get current() { | 3418 get current() { |
3419 return this[_current]; | 3419 return this[_current$]; |
3420 } | 3420 } |
3421 moveNext() { | 3421 moveNext() { |
3422 if (this[_state] === _StreamIteratorImpl._STATE_DONE) { | 3422 if (this[_state] === _StreamIteratorImpl._STATE_DONE) { |
3423 return new _Future.immediate(false); | 3423 return new _Future.immediate(false); |
3424 } | 3424 } |
3425 if (this[_state] === _StreamIteratorImpl._STATE_MOVING) { | 3425 if (this[_state] === _StreamIteratorImpl._STATE_MOVING) { |
3426 throw new core.StateError("Already waiting for next."); | 3426 throw new core.StateError("Already waiting for next."); |
3427 } | 3427 } |
3428 if (this[_state] === _StreamIteratorImpl._STATE_FOUND) { | 3428 if (this[_state] === _StreamIteratorImpl._STATE_FOUND) { |
3429 this[_state] = _StreamIteratorImpl._STATE_MOVING; | 3429 this[_state] = _StreamIteratorImpl._STATE_MOVING; |
3430 this[_current] = null; | 3430 this[_current$] = null; |
3431 this[_futureOrPrefetch] = new _Future(); | 3431 this[_futureOrPrefetch] = new _Future(); |
3432 return dart.as(this[_futureOrPrefetch], Future$(core.bool)); | 3432 return dart.as(this[_futureOrPrefetch], Future$(core.bool)); |
3433 } else { | 3433 } else { |
3434 dart.assert(dart.notNull(this[_state]) >= dart.notNull(_StreamIterator
Impl._STATE_EXTRA_DATA)); | 3434 dart.assert(dart.notNull(this[_state]) >= dart.notNull(_StreamIterator
Impl._STATE_EXTRA_DATA)); |
3435 switch (this[_state]) { | 3435 switch (this[_state]) { |
3436 case _StreamIteratorImpl._STATE_EXTRA_DATA: | 3436 case _StreamIteratorImpl._STATE_EXTRA_DATA: |
3437 this[_state] = _StreamIteratorImpl._STATE_FOUND; | 3437 this[_state] = _StreamIteratorImpl._STATE_FOUND; |
3438 this[_current] = dart.as(this[_futureOrPrefetch], T); | 3438 this[_current$] = dart.as(this[_futureOrPrefetch], T); |
3439 this[_futureOrPrefetch] = null; | 3439 this[_futureOrPrefetch] = null; |
3440 this[_subscription].resume(); | 3440 this[_subscription].resume(); |
3441 return new _Future.immediate(true); | 3441 return new _Future.immediate(true); |
3442 case _StreamIteratorImpl._STATE_EXTRA_ERROR: | 3442 case _StreamIteratorImpl._STATE_EXTRA_ERROR: |
3443 let prefetch = dart.as(this[_futureOrPrefetch], AsyncError); | 3443 let prefetch = dart.as(this[_futureOrPrefetch], AsyncError); |
3444 this[_clear](); | 3444 this[_clear](); |
3445 return new _Future.immediateError(prefetch.error, prefetch.stackTr
ace); | 3445 return new _Future.immediateError(prefetch.error, prefetch.stackTr
ace); |
3446 case _StreamIteratorImpl._STATE_EXTRA_DONE: | 3446 case _StreamIteratorImpl._STATE_EXTRA_DONE: |
3447 this[_clear](); | 3447 this[_clear](); |
3448 return new _Future.immediate(false); | 3448 return new _Future.immediate(false); |
3449 } | 3449 } |
3450 } | 3450 } |
3451 } | 3451 } |
3452 [_clear]() { | 3452 [_clear]() { |
3453 this[_subscription] = null; | 3453 this[_subscription] = null; |
3454 this[_futureOrPrefetch] = null; | 3454 this[_futureOrPrefetch] = null; |
3455 this[_current] = null; | 3455 this[_current$] = null; |
3456 this[_state] = _StreamIteratorImpl._STATE_DONE; | 3456 this[_state] = _StreamIteratorImpl._STATE_DONE; |
3457 } | 3457 } |
3458 cancel() { | 3458 cancel() { |
3459 let subscription = this[_subscription]; | 3459 let subscription = this[_subscription]; |
3460 if (this[_state] === _StreamIteratorImpl._STATE_MOVING) { | 3460 if (this[_state] === _StreamIteratorImpl._STATE_MOVING) { |
3461 let hasNext = dart.as(this[_futureOrPrefetch], _Future$(core.bool)); | 3461 let hasNext = dart.as(this[_futureOrPrefetch], _Future$(core.bool)); |
3462 this[_clear](); | 3462 this[_clear](); |
3463 hasNext._complete(false); | 3463 hasNext._complete(false); |
3464 } else { | 3464 } else { |
3465 this[_clear](); | 3465 this[_clear](); |
3466 } | 3466 } |
3467 return subscription.cancel(); | 3467 return subscription.cancel(); |
3468 } | 3468 } |
3469 [_onData](data) { | 3469 [_onData](data) { |
3470 if (this[_state] === _StreamIteratorImpl._STATE_MOVING) { | 3470 if (this[_state] === _StreamIteratorImpl._STATE_MOVING) { |
3471 this[_current] = data; | 3471 this[_current$] = data; |
3472 let hasNext = dart.as(this[_futureOrPrefetch], _Future$(core.bool)); | 3472 let hasNext = dart.as(this[_futureOrPrefetch], _Future$(core.bool)); |
3473 this[_futureOrPrefetch] = null; | 3473 this[_futureOrPrefetch] = null; |
3474 this[_state] = _StreamIteratorImpl._STATE_FOUND; | 3474 this[_state] = _StreamIteratorImpl._STATE_FOUND; |
3475 hasNext._complete(true); | 3475 hasNext._complete(true); |
3476 return; | 3476 return; |
3477 } | 3477 } |
3478 this[_subscription].pause(); | 3478 this[_subscription].pause(); |
3479 dart.assert(this[_futureOrPrefetch] === null); | 3479 dart.assert(this[_futureOrPrefetch] === null); |
3480 this[_futureOrPrefetch] = data; | 3480 this[_futureOrPrefetch] = data; |
3481 this[_state] = _StreamIteratorImpl._STATE_EXTRA_DATA; | 3481 this[_state] = _StreamIteratorImpl._STATE_EXTRA_DATA; |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3561 cancelFuture.whenComplete(() => future._complete(value)); | 3561 cancelFuture.whenComplete(() => future._complete(value)); |
3562 } else { | 3562 } else { |
3563 future._complete(value); | 3563 future._complete(value); |
3564 } | 3564 } |
3565 } | 3565 } |
3566 let _handleData = Symbol('_handleData'); | 3566 let _handleData = Symbol('_handleData'); |
3567 let _handleError = Symbol('_handleError'); | 3567 let _handleError = Symbol('_handleError'); |
3568 let _handleDone = Symbol('_handleDone'); | 3568 let _handleDone = Symbol('_handleDone'); |
3569 let _ForwardingStream$ = dart.generic(function(S, T) { | 3569 let _ForwardingStream$ = dart.generic(function(S, T) { |
3570 class _ForwardingStream extends Stream$(T) { | 3570 class _ForwardingStream extends Stream$(T) { |
3571 _ForwardingStream($_source) { | 3571 _ForwardingStream(source$) { |
3572 this[_source] = $_source; | 3572 this[_source] = source$; |
3573 super.Stream(); | 3573 super.Stream(); |
3574 } | 3574 } |
3575 get isBroadcast() { | 3575 get isBroadcast() { |
3576 return this[_source].isBroadcast; | 3576 return this[_source].isBroadcast; |
3577 } | 3577 } |
3578 listen(onData, opt$) { | 3578 listen(onData, opts) { |
3579 let onError = opt$ && 'onError' in opt$ ? opt$.onError : null; | 3579 let onError = opts && 'onError' in opts ? opts.onError : null; |
3580 let onDone = opt$ && 'onDone' in opt$ ? opt$.onDone : null; | 3580 let onDone = opts && 'onDone' in opts ? opts.onDone : null; |
3581 let cancelOnError = opt$ && 'cancelOnError' in opt$ ? opt$.cancelOnError
: null; | 3581 let cancelOnError = opts && 'cancelOnError' in opts ? opts.cancelOnError
: null; |
3582 cancelOnError = core.identical(true, cancelOnError); | 3582 cancelOnError = core.identical(true, cancelOnError); |
3583 return this[_createSubscription](onData, onError, onDone, cancelOnError)
; | 3583 return this[_createSubscription](onData, onError, onDone, cancelOnError)
; |
3584 } | 3584 } |
3585 [_createSubscription](onData, onError, onDone, cancelOnError) { | 3585 [_createSubscription](onData, onError, onDone, cancelOnError) { |
3586 return new _ForwardingStreamSubscription(this, onData, onError, onDone,
cancelOnError); | 3586 return new _ForwardingStreamSubscription(this, onData, onError, onDone,
cancelOnError); |
3587 } | 3587 } |
3588 [_handleData](data, sink) { | 3588 [_handleData](data, sink) { |
3589 let outputData = data; | 3589 let outputData = data; |
3590 sink._add(outputData); | 3590 sink._add(outputData); |
3591 } | 3591 } |
3592 [_handleError](error, stackTrace, sink) { | 3592 [_handleError](error, stackTrace, sink) { |
3593 sink._addError(error, stackTrace); | 3593 sink._addError(error, stackTrace); |
3594 } | 3594 } |
3595 [_handleDone](sink) { | 3595 [_handleDone](sink) { |
3596 sink._close(); | 3596 sink._close(); |
3597 } | 3597 } |
3598 } | 3598 } |
3599 return _ForwardingStream; | 3599 return _ForwardingStream; |
3600 }); | 3600 }); |
3601 let _ForwardingStream = _ForwardingStream$(dart.dynamic, dart.dynamic); | 3601 let _ForwardingStream = _ForwardingStream$(dart.dynamic, dart.dynamic); |
3602 let _ForwardingStreamSubscription$ = dart.generic(function(S, T) { | 3602 let _ForwardingStreamSubscription$ = dart.generic(function(S, T) { |
3603 class _ForwardingStreamSubscription extends _BufferingStreamSubscription$(T)
{ | 3603 class _ForwardingStreamSubscription extends _BufferingStreamSubscription$(T)
{ |
3604 _ForwardingStreamSubscription($_stream, onData, onError, onDone, cancelOnE
rror) { | 3604 _ForwardingStreamSubscription(stream$, onData, onError, onDone, cancelOnEr
ror) { |
3605 this[_stream] = $_stream; | 3605 this[_stream] = stream$; |
3606 this[_subscription] = null; | 3606 this[_subscription] = null; |
3607 super._BufferingStreamSubscription(onData, onError, onDone, cancelOnErro
r); | 3607 super._BufferingStreamSubscription(onData, onError, onDone, cancelOnErro
r); |
3608 this[_subscription] = this[_stream][_source].listen(this[_handleData], {
onError: this[_handleError], onDone: this[_handleDone]}); | 3608 this[_subscription] = this[_stream][_source].listen(this[_handleData], {
onError: this[_handleError], onDone: this[_handleDone]}); |
3609 } | 3609 } |
3610 [_add](data) { | 3610 [_add](data) { |
3611 if (this[_isClosed]) | 3611 if (this[_isClosed]) |
3612 return; | 3612 return; |
3613 super._add(data); | 3613 super._add(data); |
3614 } | 3614 } |
3615 [_addError](error, stackTrace) { | 3615 [_addError](error, stackTrace) { |
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3904 get _SENTINEL() { | 3904 get _SENTINEL() { |
3905 return new core.Object(); | 3905 return new core.Object(); |
3906 }, | 3906 }, |
3907 set _SENTINEL(_) {} | 3907 set _SENTINEL(_) {} |
3908 }); | 3908 }); |
3909 return _DistinctStream; | 3909 return _DistinctStream; |
3910 }); | 3910 }); |
3911 let _DistinctStream = _DistinctStream$(dart.dynamic); | 3911 let _DistinctStream = _DistinctStream$(dart.dynamic); |
3912 let _EventSinkWrapper$ = dart.generic(function(T) { | 3912 let _EventSinkWrapper$ = dart.generic(function(T) { |
3913 class _EventSinkWrapper extends core.Object { | 3913 class _EventSinkWrapper extends core.Object { |
3914 _EventSinkWrapper($_sink) { | 3914 _EventSinkWrapper(sink$) { |
3915 this[_sink] = $_sink; | 3915 this[_sink] = sink$; |
3916 } | 3916 } |
3917 add(data) { | 3917 add(data) { |
3918 this[_sink]._add(data); | 3918 this[_sink]._add(data); |
3919 } | 3919 } |
3920 addError(error, stackTrace) { | 3920 addError(error, stackTrace) { |
3921 if (stackTrace === void 0) | 3921 if (stackTrace === void 0) |
3922 stackTrace = null; | 3922 stackTrace = null; |
3923 this[_sink]._addError(error, stackTrace); | 3923 this[_sink]._addError(error, stackTrace); |
3924 } | 3924 } |
3925 close() { | 3925 close() { |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4012 } | 4012 } |
4013 | 4013 |
4014 } | 4014 } |
4015 } | 4015 } |
4016 return _SinkTransformerStreamSubscription; | 4016 return _SinkTransformerStreamSubscription; |
4017 }); | 4017 }); |
4018 let _SinkTransformerStreamSubscription = _SinkTransformerStreamSubscription$(d
art.dynamic, dart.dynamic); | 4018 let _SinkTransformerStreamSubscription = _SinkTransformerStreamSubscription$(d
art.dynamic, dart.dynamic); |
4019 let _sinkMapper = Symbol('_sinkMapper'); | 4019 let _sinkMapper = Symbol('_sinkMapper'); |
4020 let _StreamSinkTransformer$ = dart.generic(function(S, T) { | 4020 let _StreamSinkTransformer$ = dart.generic(function(S, T) { |
4021 class _StreamSinkTransformer extends core.Object { | 4021 class _StreamSinkTransformer extends core.Object { |
4022 _StreamSinkTransformer($_sinkMapper) { | 4022 _StreamSinkTransformer(sinkMapper) { |
4023 this[_sinkMapper] = $_sinkMapper; | 4023 this[_sinkMapper] = sinkMapper; |
4024 } | 4024 } |
4025 bind(stream) { | 4025 bind(stream) { |
4026 return new _BoundSinkStream(stream, this[_sinkMapper]); | 4026 return new _BoundSinkStream(stream, this[_sinkMapper]); |
4027 } | 4027 } |
4028 } | 4028 } |
4029 return _StreamSinkTransformer; | 4029 return _StreamSinkTransformer; |
4030 }); | 4030 }); |
4031 let _StreamSinkTransformer = _StreamSinkTransformer$(dart.dynamic, dart.dynami
c); | 4031 let _StreamSinkTransformer = _StreamSinkTransformer$(dart.dynamic, dart.dynami
c); |
4032 let _BoundSinkStream$ = dart.generic(function(S, T) { | 4032 let _BoundSinkStream$ = dart.generic(function(S, T) { |
4033 class _BoundSinkStream extends Stream$(T) { | 4033 class _BoundSinkStream extends Stream$(T) { |
4034 get isBroadcast() { | 4034 get isBroadcast() { |
4035 return this[_stream].isBroadcast; | 4035 return this[_stream].isBroadcast; |
4036 } | 4036 } |
4037 _BoundSinkStream($_stream, $_sinkMapper) { | 4037 _BoundSinkStream(stream$, sinkMapper) { |
4038 this[_stream] = $_stream; | 4038 this[_stream] = stream$; |
4039 this[_sinkMapper] = $_sinkMapper; | 4039 this[_sinkMapper] = sinkMapper; |
4040 super.Stream(); | 4040 super.Stream(); |
4041 } | 4041 } |
4042 listen(onData, opt$) { | 4042 listen(onData, opts) { |
4043 let onError = opt$ && 'onError' in opt$ ? opt$.onError : null; | 4043 let onError = opts && 'onError' in opts ? opts.onError : null; |
4044 let onDone = opt$ && 'onDone' in opt$ ? opt$.onDone : null; | 4044 let onDone = opts && 'onDone' in opts ? opts.onDone : null; |
4045 let cancelOnError = opt$ && 'cancelOnError' in opt$ ? opt$.cancelOnError
: null; | 4045 let cancelOnError = opts && 'cancelOnError' in opts ? opts.cancelOnError
: null; |
4046 cancelOnError = core.identical(true, cancelOnError); | 4046 cancelOnError = core.identical(true, cancelOnError); |
4047 let subscription = dart.as(new _SinkTransformerStreamSubscription(this[_
stream], dart.closureWrap(this[_sinkMapper], "(EventSink<dynamic>) → EventSink")
, onData, onError, onDone, cancelOnError), StreamSubscription$(T)); | 4047 let subscription = dart.as(new _SinkTransformerStreamSubscription(this[_
stream], dart.closureWrap(this[_sinkMapper], "(EventSink<dynamic>) → EventSink")
, onData, onError, onDone, cancelOnError), StreamSubscription$(T)); |
4048 return subscription; | 4048 return subscription; |
4049 } | 4049 } |
4050 } | 4050 } |
4051 return _BoundSinkStream; | 4051 return _BoundSinkStream; |
4052 }); | 4052 }); |
4053 let _BoundSinkStream = _BoundSinkStream$(dart.dynamic, dart.dynamic); | 4053 let _BoundSinkStream = _BoundSinkStream$(dart.dynamic, dart.dynamic); |
4054 let _HandlerEventSink$ = dart.generic(function(S, T) { | 4054 let _HandlerEventSink$ = dart.generic(function(S, T) { |
4055 class _HandlerEventSink extends core.Object { | 4055 class _HandlerEventSink extends core.Object { |
4056 _HandlerEventSink($_handleData, $_handleError, $_handleDone, $_sink) { | 4056 _HandlerEventSink(handleData$, handleError$, handleDone$, sink$) { |
4057 this[_handleData] = $_handleData; | 4057 this[_handleData] = handleData$; |
4058 this[_handleError] = $_handleError; | 4058 this[_handleError] = handleError$; |
4059 this[_handleDone] = $_handleDone; | 4059 this[_handleDone] = handleDone$; |
4060 this[_sink] = $_sink; | 4060 this[_sink] = sink$; |
4061 } | 4061 } |
4062 add(data) { | 4062 add(data) { |
4063 return this[_handleData](data, this[_sink]); | 4063 return this[_handleData](data, this[_sink]); |
4064 } | 4064 } |
4065 addError(error, stackTrace) { | 4065 addError(error, stackTrace) { |
4066 if (stackTrace === void 0) | 4066 if (stackTrace === void 0) |
4067 stackTrace = null; | 4067 stackTrace = null; |
4068 return this[_handleError](error, stackTrace, this[_sink]); | 4068 return this[_handleError](error, stackTrace, this[_sink]); |
4069 } | 4069 } |
4070 close() { | 4070 close() { |
4071 return this[_handleDone](this[_sink]); | 4071 return this[_handleDone](this[_sink]); |
4072 } | 4072 } |
4073 } | 4073 } |
4074 return _HandlerEventSink; | 4074 return _HandlerEventSink; |
4075 }); | 4075 }); |
4076 let _HandlerEventSink = _HandlerEventSink$(dart.dynamic, dart.dynamic); | 4076 let _HandlerEventSink = _HandlerEventSink$(dart.dynamic, dart.dynamic); |
4077 let _defaultHandleData = Symbol('_defaultHandleData'); | 4077 let _defaultHandleData$ = Symbol('_defaultHandleData'); |
4078 let _defaultHandleError = Symbol('_defaultHandleError'); | 4078 let _defaultHandleError$ = Symbol('_defaultHandleError'); |
4079 let _defaultHandleDone = Symbol('_defaultHandleDone'); | 4079 let _defaultHandleDone$ = Symbol('_defaultHandleDone'); |
4080 let _StreamHandlerTransformer$ = dart.generic(function(S, T) { | 4080 let _StreamHandlerTransformer$ = dart.generic(function(S, T) { |
4081 class _StreamHandlerTransformer extends _StreamSinkTransformer$(S, T) { | 4081 class _StreamHandlerTransformer extends _StreamSinkTransformer$(S, T) { |
4082 _StreamHandlerTransformer(opt$) { | 4082 _StreamHandlerTransformer(opts) { |
4083 let handleData = opt$ && 'handleData' in opt$ ? opt$.handleData : null; | 4083 let handleData = opts && 'handleData' in opts ? opts.handleData : null; |
4084 let handleError = opt$ && 'handleError' in opt$ ? opt$.handleError : nul
l; | 4084 let handleError = opts && 'handleError' in opts ? opts.handleError : nul
l; |
4085 let handleDone = opt$ && 'handleDone' in opt$ ? opt$.handleDone : null; | 4085 let handleDone = opts && 'handleDone' in opts ? opts.handleDone : null; |
4086 super._StreamSinkTransformer(dart.closureWrap((outputSink) => { | 4086 super._StreamSinkTransformer(dart.closureWrap((outputSink) => { |
4087 if (handleData === null) | 4087 if (handleData === null) |
4088 handleData = dart.closureWrap(_defaultHandleData, "(S, EventSink<T>)
→ void"); | 4088 handleData = dart.closureWrap(_defaultHandleData, "(S, EventSink<T>)
→ void"); |
4089 if (handleError === null) | 4089 if (handleError === null) |
4090 handleError = dart.closureWrap(_defaultHandleError, "(Object, StackT
race, EventSink<T>) → void"); | 4090 handleError = dart.closureWrap(_defaultHandleError, "(Object, StackT
race, EventSink<T>) → void"); |
4091 if (handleDone === null) | 4091 if (handleDone === null) |
4092 handleDone = _defaultHandleDone; | 4092 handleDone = _defaultHandleDone; |
4093 return new _HandlerEventSink(handleData, handleError, handleDone, outp
utSink); | 4093 return new _HandlerEventSink(handleData, handleError, handleDone, outp
utSink); |
4094 }, "(EventSink<T>) → EventSink<S>")); | 4094 }, "(EventSink<T>) → EventSink<S>")); |
4095 } | 4095 } |
4096 bind(stream) { | 4096 bind(stream) { |
4097 return super.bind(stream); | 4097 return super.bind(stream); |
4098 } | 4098 } |
4099 static [_defaultHandleData](data, sink) { | 4099 static [_defaultHandleData$](data, sink) { |
4100 sink.add(data); | 4100 sink.add(data); |
4101 } | 4101 } |
4102 static [_defaultHandleError](error, stackTrace, sink) { | 4102 static [_defaultHandleError$](error, stackTrace, sink) { |
4103 sink.addError(error); | 4103 sink.addError(error); |
4104 } | 4104 } |
4105 static [_defaultHandleDone](sink) { | 4105 static [_defaultHandleDone$](sink) { |
4106 sink.close(); | 4106 sink.close(); |
4107 } | 4107 } |
4108 } | 4108 } |
4109 return _StreamHandlerTransformer; | 4109 return _StreamHandlerTransformer; |
4110 }); | 4110 }); |
4111 let _StreamHandlerTransformer = _StreamHandlerTransformer$(dart.dynamic, dart.
dynamic); | 4111 let _StreamHandlerTransformer = _StreamHandlerTransformer$(dart.dynamic, dart.
dynamic); |
4112 let _transformer = Symbol('_transformer'); | 4112 let _transformer = Symbol('_transformer'); |
4113 let _StreamSubscriptionTransformer$ = dart.generic(function(S, T) { | 4113 let _StreamSubscriptionTransformer$ = dart.generic(function(S, T) { |
4114 class _StreamSubscriptionTransformer extends core.Object { | 4114 class _StreamSubscriptionTransformer extends core.Object { |
4115 _StreamSubscriptionTransformer($_transformer) { | 4115 _StreamSubscriptionTransformer(transformer$) { |
4116 this[_transformer] = $_transformer; | 4116 this[_transformer] = transformer$; |
4117 } | 4117 } |
4118 bind(stream) { | 4118 bind(stream) { |
4119 return new _BoundSubscriptionStream(stream, this[_transformer]); | 4119 return new _BoundSubscriptionStream(stream, this[_transformer]); |
4120 } | 4120 } |
4121 } | 4121 } |
4122 return _StreamSubscriptionTransformer; | 4122 return _StreamSubscriptionTransformer; |
4123 }); | 4123 }); |
4124 let _StreamSubscriptionTransformer = _StreamSubscriptionTransformer$(dart.dyna
mic, dart.dynamic); | 4124 let _StreamSubscriptionTransformer = _StreamSubscriptionTransformer$(dart.dyna
mic, dart.dynamic); |
4125 let _BoundSubscriptionStream$ = dart.generic(function(S, T) { | 4125 let _BoundSubscriptionStream$ = dart.generic(function(S, T) { |
4126 class _BoundSubscriptionStream extends Stream$(T) { | 4126 class _BoundSubscriptionStream extends Stream$(T) { |
4127 _BoundSubscriptionStream($_stream, $_transformer) { | 4127 _BoundSubscriptionStream(stream$, transformer$) { |
4128 this[_stream] = $_stream; | 4128 this[_stream] = stream$; |
4129 this[_transformer] = $_transformer; | 4129 this[_transformer] = transformer$; |
4130 super.Stream(); | 4130 super.Stream(); |
4131 } | 4131 } |
4132 listen(onData, opt$) { | 4132 listen(onData, opts) { |
4133 let onError = opt$ && 'onError' in opt$ ? opt$.onError : null; | 4133 let onError = opts && 'onError' in opts ? opts.onError : null; |
4134 let onDone = opt$ && 'onDone' in opt$ ? opt$.onDone : null; | 4134 let onDone = opts && 'onDone' in opts ? opts.onDone : null; |
4135 let cancelOnError = opt$ && 'cancelOnError' in opt$ ? opt$.cancelOnError
: null; | 4135 let cancelOnError = opts && 'cancelOnError' in opts ? opts.cancelOnError
: null; |
4136 cancelOnError = core.identical(true, cancelOnError); | 4136 cancelOnError = core.identical(true, cancelOnError); |
4137 let result = this[_transformer](this[_stream], cancelOnError); | 4137 let result = this[_transformer](this[_stream], cancelOnError); |
4138 result.onData(onData); | 4138 result.onData(onData); |
4139 result.onError(onError); | 4139 result.onError(onError); |
4140 result.onDone(onDone); | 4140 result.onDone(onDone); |
4141 return result; | 4141 return result; |
4142 } | 4142 } |
4143 } | 4143 } |
4144 return _BoundSubscriptionStream; | 4144 return _BoundSubscriptionStream; |
4145 }); | 4145 }); |
(...skipping 24 matching lines...) Expand all Loading... |
4170 } | 4170 } |
4171 static [_createPeriodicTimer](duration, callback) { | 4171 static [_createPeriodicTimer](duration, callback) { |
4172 let milliseconds = duration.inMilliseconds; | 4172 let milliseconds = duration.inMilliseconds; |
4173 if (dart.notNull(milliseconds) < 0) | 4173 if (dart.notNull(milliseconds) < 0) |
4174 milliseconds = 0; | 4174 milliseconds = 0; |
4175 return new _isolate_helper.TimerImpl.periodic(milliseconds, callback); | 4175 return new _isolate_helper.TimerImpl.periodic(milliseconds, callback); |
4176 } | 4176 } |
4177 } | 4177 } |
4178 dart.defineNamedConstructor(Timer, 'periodic'); | 4178 dart.defineNamedConstructor(Timer, 'periodic'); |
4179 class _ZoneFunction extends core.Object { | 4179 class _ZoneFunction extends core.Object { |
4180 _ZoneFunction(zone, function) { | 4180 _ZoneFunction(zone, func) { |
4181 this.zone = zone; | 4181 this.zone = zone; |
4182 this['function'] = function; | 4182 this.function = func; |
4183 } | 4183 } |
4184 } | 4184 } |
4185 class ZoneSpecification extends core.Object { | 4185 class ZoneSpecification extends core.Object { |
4186 ZoneSpecification(opt$) { | 4186 ZoneSpecification(opts) { |
4187 return new _ZoneSpecification(opt$); | 4187 return new _ZoneSpecification(opts); |
4188 } | 4188 } |
4189 ZoneSpecification$from(other, opt$) { | 4189 ZoneSpecification$from(other, opts) { |
4190 let handleUncaughtError = opt$ && 'handleUncaughtError' in opt$ ? opt$.han
dleUncaughtError : null; | 4190 let handleUncaughtError = opts && 'handleUncaughtError' in opts ? opts.han
dleUncaughtError : null; |
4191 let run = opt$ && 'run' in opt$ ? opt$.run : null; | 4191 let run = opts && 'run' in opts ? opts.run : null; |
4192 let runUnary = opt$ && 'runUnary' in opt$ ? opt$.runUnary : null; | 4192 let runUnary = opts && 'runUnary' in opts ? opts.runUnary : null; |
4193 let runBinary = opt$ && 'runBinary' in opt$ ? opt$.runBinary : null; | 4193 let runBinary = opts && 'runBinary' in opts ? opts.runBinary : null; |
4194 let registerCallback = opt$ && 'registerCallback' in opt$ ? opt$.registerC
allback : null; | 4194 let registerCallback = opts && 'registerCallback' in opts ? opts.registerC
allback : null; |
4195 let registerUnaryCallback = opt$ && 'registerUnaryCallback' in opt$ ? opt$
.registerUnaryCallback : null; | 4195 let registerUnaryCallback = opts && 'registerUnaryCallback' in opts ? opts
.registerUnaryCallback : null; |
4196 let registerBinaryCallback = opt$ && 'registerBinaryCallback' in opt$ ? op
t$.registerBinaryCallback : null; | 4196 let registerBinaryCallback = opts && 'registerBinaryCallback' in opts ? op
ts.registerBinaryCallback : null; |
4197 let errorCallback = opt$ && 'errorCallback' in opt$ ? opt$.errorCallback :
null; | 4197 let errorCallback = opts && 'errorCallback' in opts ? opts.errorCallback :
null; |
4198 let scheduleMicrotask = opt$ && 'scheduleMicrotask' in opt$ ? opt$.schedul
eMicrotask : null; | 4198 let scheduleMicrotask = opts && 'scheduleMicrotask' in opts ? opts.schedul
eMicrotask : null; |
4199 let createTimer = opt$ && 'createTimer' in opt$ ? opt$.createTimer : null; | 4199 let createTimer = opts && 'createTimer' in opts ? opts.createTimer : null; |
4200 let createPeriodicTimer = opt$ && 'createPeriodicTimer' in opt$ ? opt$.cre
atePeriodicTimer : null; | 4200 let createPeriodicTimer = opts && 'createPeriodicTimer' in opts ? opts.cre
atePeriodicTimer : null; |
4201 let print = opt$ && 'print' in opt$ ? opt$.print : null; | 4201 let print = opts && 'print' in opts ? opts.print : null; |
4202 let fork = opt$ && 'fork' in opt$ ? opt$.fork : null; | 4202 let fork = opts && 'fork' in opts ? opts.fork : null; |
4203 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"))}); | 4203 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"))}); |
4204 } | 4204 } |
4205 } | 4205 } |
4206 dart.defineNamedConstructor(ZoneSpecification, 'from'); | 4206 dart.defineNamedConstructor(ZoneSpecification, 'from'); |
4207 class _ZoneSpecification extends core.Object { | 4207 class _ZoneSpecification extends core.Object { |
4208 _ZoneSpecification(opt$) { | 4208 _ZoneSpecification(opts) { |
4209 let handleUncaughtError = opt$ && 'handleUncaughtError' in opt$ ? opt$.han
dleUncaughtError : null; | 4209 let handleUncaughtError = opts && 'handleUncaughtError' in opts ? opts.han
dleUncaughtError : null; |
4210 let run = opt$ && 'run' in opt$ ? opt$.run : null; | 4210 let run = opts && 'run' in opts ? opts.run : null; |
4211 let runUnary = opt$ && 'runUnary' in opt$ ? opt$.runUnary : null; | 4211 let runUnary = opts && 'runUnary' in opts ? opts.runUnary : null; |
4212 let runBinary = opt$ && 'runBinary' in opt$ ? opt$.runBinary : null; | 4212 let runBinary = opts && 'runBinary' in opts ? opts.runBinary : null; |
4213 let registerCallback = opt$ && 'registerCallback' in opt$ ? opt$.registerC
allback : null; | 4213 let registerCallback = opts && 'registerCallback' in opts ? opts.registerC
allback : null; |
4214 let registerUnaryCallback = opt$ && 'registerUnaryCallback' in opt$ ? opt$
.registerUnaryCallback : null; | 4214 let registerUnaryCallback = opts && 'registerUnaryCallback' in opts ? opts
.registerUnaryCallback : null; |
4215 let registerBinaryCallback = opt$ && 'registerBinaryCallback' in opt$ ? op
t$.registerBinaryCallback : null; | 4215 let registerBinaryCallback = opts && 'registerBinaryCallback' in opts ? op
ts.registerBinaryCallback : null; |
4216 let errorCallback = opt$ && 'errorCallback' in opt$ ? opt$.errorCallback :
null; | 4216 let errorCallback = opts && 'errorCallback' in opts ? opts.errorCallback :
null; |
4217 let scheduleMicrotask = opt$ && 'scheduleMicrotask' in opt$ ? opt$.schedul
eMicrotask : null; | 4217 let scheduleMicrotask = opts && 'scheduleMicrotask' in opts ? opts.schedul
eMicrotask : null; |
4218 let createTimer = opt$ && 'createTimer' in opt$ ? opt$.createTimer : null; | 4218 let createTimer = opts && 'createTimer' in opts ? opts.createTimer : null; |
4219 let createPeriodicTimer = opt$ && 'createPeriodicTimer' in opt$ ? opt$.cre
atePeriodicTimer : null; | 4219 let createPeriodicTimer = opts && 'createPeriodicTimer' in opts ? opts.cre
atePeriodicTimer : null; |
4220 let print = opt$ && 'print' in opt$ ? opt$.print : null; | 4220 let print = opts && 'print' in opts ? opts.print : null; |
4221 let fork = opt$ && 'fork' in opt$ ? opt$.fork : null; | 4221 let fork = opts && 'fork' in opts ? opts.fork : null; |
4222 this.handleUncaughtError = handleUncaughtError; | 4222 this.handleUncaughtError = handleUncaughtError; |
4223 this.run = run; | 4223 this.run = run; |
4224 this.runUnary = runUnary; | 4224 this.runUnary = runUnary; |
4225 this.runBinary = runBinary; | 4225 this.runBinary = runBinary; |
4226 this.registerCallback = registerCallback; | 4226 this.registerCallback = registerCallback; |
4227 this.registerUnaryCallback = registerUnaryCallback; | 4227 this.registerUnaryCallback = registerUnaryCallback; |
4228 this.registerBinaryCallback = registerBinaryCallback; | 4228 this.registerBinaryCallback = registerBinaryCallback; |
4229 this.errorCallback = errorCallback; | 4229 this.errorCallback = errorCallback; |
4230 this.scheduleMicrotask = scheduleMicrotask; | 4230 this.scheduleMicrotask = scheduleMicrotask; |
4231 this.createTimer = createTimer; | 4231 this.createTimer = createTimer; |
(...skipping 14 matching lines...) Expand all Loading... |
4246 } | 4246 } |
4247 static [_enter](zone) { | 4247 static [_enter](zone) { |
4248 dart.assert(zone !== null); | 4248 dart.assert(zone !== null); |
4249 dart.assert(!dart.notNull(core.identical(zone, _current))); | 4249 dart.assert(!dart.notNull(core.identical(zone, _current))); |
4250 let previous = _current; | 4250 let previous = _current; |
4251 _current = zone; | 4251 _current = zone; |
4252 return previous; | 4252 return previous; |
4253 } | 4253 } |
4254 static [_leave](previous) { | 4254 static [_leave](previous) { |
4255 dart.assert(previous !== null); | 4255 dart.assert(previous !== null); |
4256 Zone[_current] = previous; | 4256 Zone[_current$] = previous; |
4257 } | 4257 } |
4258 } | 4258 } |
4259 dart.defineNamedConstructor(Zone, '_'); | 4259 dart.defineNamedConstructor(Zone, '_'); |
4260 Zone.ROOT = _ROOT_ZONE; | 4260 Zone.ROOT = _ROOT_ZONE; |
4261 Zone._current = _ROOT_ZONE; | 4261 Zone._current = _ROOT_ZONE; |
4262 let _delegate = Symbol('_delegate'); | 4262 let _delegate = Symbol('_delegate'); |
4263 // Function _parentDelegate: (_Zone) → ZoneDelegate | 4263 // Function _parentDelegate: (_Zone) → ZoneDelegate |
4264 function _parentDelegate(zone) { | 4264 function _parentDelegate(zone) { |
4265 if (zone.parent === null) | 4265 if (zone.parent === null) |
4266 return null; | 4266 return null; |
4267 return zone.parent[_delegate]; | 4267 return zone.parent[_delegate]; |
4268 } | 4268 } |
4269 let _delegationTarget = Symbol('_delegationTarget'); | 4269 let _delegationTarget = Symbol('_delegationTarget'); |
4270 let _handleUncaughtError = Symbol('_handleUncaughtError'); | 4270 let _handleUncaughtError = Symbol('_handleUncaughtError'); |
4271 let _run = Symbol('_run'); | 4271 let _run = Symbol('_run'); |
4272 let _runUnary = Symbol('_runUnary'); | 4272 let _runUnary = Symbol('_runUnary'); |
4273 let _runBinary = Symbol('_runBinary'); | 4273 let _runBinary = Symbol('_runBinary'); |
4274 let _registerCallback = Symbol('_registerCallback'); | 4274 let _registerCallback = Symbol('_registerCallback'); |
4275 let _registerUnaryCallback = Symbol('_registerUnaryCallback'); | 4275 let _registerUnaryCallback = Symbol('_registerUnaryCallback'); |
4276 let _registerBinaryCallback = Symbol('_registerBinaryCallback'); | 4276 let _registerBinaryCallback = Symbol('_registerBinaryCallback'); |
4277 let _errorCallback = Symbol('_errorCallback'); | 4277 let _errorCallback = Symbol('_errorCallback'); |
4278 let _scheduleMicrotask = Symbol('_scheduleMicrotask'); | 4278 let _scheduleMicrotask = Symbol('_scheduleMicrotask'); |
4279 let _print = Symbol('_print'); | 4279 let _print = Symbol('_print'); |
4280 let _fork = Symbol('_fork'); | 4280 let _fork = Symbol('_fork'); |
4281 class _ZoneDelegate extends core.Object { | 4281 class _ZoneDelegate extends core.Object { |
4282 _ZoneDelegate($_delegationTarget) { | 4282 _ZoneDelegate(delegationTarget) { |
4283 this[_delegationTarget] = $_delegationTarget; | 4283 this[_delegationTarget] = delegationTarget; |
4284 } | 4284 } |
4285 handleUncaughtError(zone, error, stackTrace) { | 4285 handleUncaughtError(zone, error, stackTrace) { |
4286 let implementation = this[_delegationTarget][_handleUncaughtError]; | 4286 let implementation = this[_delegationTarget][_handleUncaughtError]; |
4287 let implZone = implementation.zone; | 4287 let implZone = implementation.zone; |
4288 return dart.dinvokef(implementation['function'], implZone, _parentDelegate
(implZone), zone, error, stackTrace); | 4288 return dart.dinvokef(implementation.function, implZone, _parentDelegate(im
plZone), zone, error, stackTrace); |
4289 } | 4289 } |
4290 run(zone, f) { | 4290 run(zone, f) { |
4291 let implementation = this[_delegationTarget][_run]; | 4291 let implementation = this[_delegationTarget][_run]; |
4292 let implZone = implementation.zone; | 4292 let implZone = implementation.zone; |
4293 return dart.dinvokef(implementation['function'], implZone, _parentDelegate
(implZone), zone, f); | 4293 return dart.dinvokef(implementation.function, implZone, _parentDelegate(im
plZone), zone, f); |
4294 } | 4294 } |
4295 runUnary(zone, f, arg) { | 4295 runUnary(zone, f, arg) { |
4296 let implementation = this[_delegationTarget][_runUnary]; | 4296 let implementation = this[_delegationTarget][_runUnary]; |
4297 let implZone = implementation.zone; | 4297 let implZone = implementation.zone; |
4298 return dart.dinvokef(implementation['function'], implZone, _parentDelegate
(implZone), zone, f, arg); | 4298 return dart.dinvokef(implementation.function, implZone, _parentDelegate(im
plZone), zone, f, arg); |
4299 } | 4299 } |
4300 runBinary(zone, f, arg1, arg2) { | 4300 runBinary(zone, f, arg1, arg2) { |
4301 let implementation = this[_delegationTarget][_runBinary]; | 4301 let implementation = this[_delegationTarget][_runBinary]; |
4302 let implZone = implementation.zone; | 4302 let implZone = implementation.zone; |
4303 return dart.dinvokef(implementation['function'], implZone, _parentDelegate
(implZone), zone, f, arg1, arg2); | 4303 return dart.dinvokef(implementation.function, implZone, _parentDelegate(im
plZone), zone, f, arg1, arg2); |
4304 } | 4304 } |
4305 registerCallback(zone, f) { | 4305 registerCallback(zone, f) { |
4306 let implementation = this[_delegationTarget][_registerCallback]; | 4306 let implementation = this[_delegationTarget][_registerCallback]; |
4307 let implZone = implementation.zone; | 4307 let implZone = implementation.zone; |
4308 return dart.as(dart.dinvokef(implementation['function'], implZone, _parent
Delegate(implZone), zone, f), ZoneCallback); | 4308 return dart.as(dart.dinvokef(implementation.function, implZone, _parentDel
egate(implZone), zone, f), ZoneCallback); |
4309 } | 4309 } |
4310 registerUnaryCallback(zone, f) { | 4310 registerUnaryCallback(zone, f) { |
4311 let implementation = this[_delegationTarget][_registerUnaryCallback]; | 4311 let implementation = this[_delegationTarget][_registerUnaryCallback]; |
4312 let implZone = implementation.zone; | 4312 let implZone = implementation.zone; |
4313 return dart.as(dart.dinvokef(implementation['function'], implZone, _parent
Delegate(implZone), zone, f), ZoneUnaryCallback); | 4313 return dart.as(dart.dinvokef(implementation.function, implZone, _parentDel
egate(implZone), zone, f), ZoneUnaryCallback); |
4314 } | 4314 } |
4315 registerBinaryCallback(zone, f) { | 4315 registerBinaryCallback(zone, f) { |
4316 let implementation = this[_delegationTarget][_registerBinaryCallback]; | 4316 let implementation = this[_delegationTarget][_registerBinaryCallback]; |
4317 let implZone = implementation.zone; | 4317 let implZone = implementation.zone; |
4318 return dart.as(dart.dinvokef(implementation['function'], implZone, _parent
Delegate(implZone), zone, f), ZoneBinaryCallback); | 4318 return dart.as(dart.dinvokef(implementation.function, implZone, _parentDel
egate(implZone), zone, f), ZoneBinaryCallback); |
4319 } | 4319 } |
4320 errorCallback(zone, error, stackTrace) { | 4320 errorCallback(zone, error, stackTrace) { |
4321 let implementation = this[_delegationTarget][_errorCallback]; | 4321 let implementation = this[_delegationTarget][_errorCallback]; |
4322 let implZone = implementation.zone; | 4322 let implZone = implementation.zone; |
4323 if (core.identical(implZone, _ROOT_ZONE)) | 4323 if (core.identical(implZone, _ROOT_ZONE)) |
4324 return null; | 4324 return null; |
4325 return dart.as(dart.dinvokef(implementation['function'], implZone, _parent
Delegate(implZone), zone, error, stackTrace), AsyncError); | 4325 return dart.as(dart.dinvokef(implementation.function, implZone, _parentDel
egate(implZone), zone, error, stackTrace), AsyncError); |
4326 } | 4326 } |
4327 scheduleMicrotask(zone, f) { | 4327 scheduleMicrotask(zone, f) { |
4328 let implementation = this[_delegationTarget][_scheduleMicrotask]; | 4328 let implementation = this[_delegationTarget][_scheduleMicrotask]; |
4329 let implZone = implementation.zone; | 4329 let implZone = implementation.zone; |
4330 dart.dinvokef(implementation['function'], implZone, _parentDelegate(implZo
ne), zone, f); | 4330 dart.dinvokef(implementation.function, implZone, _parentDelegate(implZone)
, zone, f); |
4331 } | 4331 } |
4332 createTimer(zone, duration, f) { | 4332 createTimer(zone, duration, f) { |
4333 let implementation = this[_delegationTarget][_createTimer]; | 4333 let implementation = this[_delegationTarget][_createTimer]; |
4334 let implZone = implementation.zone; | 4334 let implZone = implementation.zone; |
4335 return dart.as(dart.dinvokef(implementation['function'], implZone, _parent
Delegate(implZone), zone, duration, f), Timer); | 4335 return dart.as(dart.dinvokef(implementation.function, implZone, _parentDel
egate(implZone), zone, duration, f), Timer); |
4336 } | 4336 } |
4337 createPeriodicTimer(zone, period, f) { | 4337 createPeriodicTimer(zone, period, f) { |
4338 let implementation = this[_delegationTarget][_createPeriodicTimer]; | 4338 let implementation = this[_delegationTarget][_createPeriodicTimer]; |
4339 let implZone = implementation.zone; | 4339 let implZone = implementation.zone; |
4340 return dart.as(dart.dinvokef(implementation['function'], implZone, _parent
Delegate(implZone), zone, period, f), Timer); | 4340 return dart.as(dart.dinvokef(implementation.function, implZone, _parentDel
egate(implZone), zone, period, f), Timer); |
4341 } | 4341 } |
4342 print(zone, line) { | 4342 print(zone, line) { |
4343 let implementation = this[_delegationTarget][_print]; | 4343 let implementation = this[_delegationTarget][_print]; |
4344 let implZone = implementation.zone; | 4344 let implZone = implementation.zone; |
4345 dart.dinvokef(implementation['function'], implZone, _parentDelegate(implZo
ne), zone, line); | 4345 dart.dinvokef(implementation.function, implZone, _parentDelegate(implZone)
, zone, line); |
4346 } | 4346 } |
4347 fork(zone, specification, zoneValues) { | 4347 fork(zone, specification, zoneValues) { |
4348 let implementation = this[_delegationTarget][_fork]; | 4348 let implementation = this[_delegationTarget][_fork]; |
4349 let implZone = implementation.zone; | 4349 let implZone = implementation.zone; |
4350 return dart.as(dart.dinvokef(implementation['function'], implZone, _parent
Delegate(implZone), zone, specification, zoneValues), Zone); | 4350 return dart.as(dart.dinvokef(implementation.function, implZone, _parentDel
egate(implZone), zone, specification, zoneValues), Zone); |
4351 } | 4351 } |
4352 } | 4352 } |
4353 class _Zone extends core.Object { | 4353 class _Zone extends core.Object { |
4354 _Zone() { | 4354 _Zone() { |
4355 } | 4355 } |
4356 inSameErrorZone(otherZone) { | 4356 inSameErrorZone(otherZone) { |
4357 return dart.notNull(core.identical(this, otherZone)) || dart.notNull(core.
identical(this.errorZone, otherZone.errorZone)); | 4357 return dart.notNull(core.identical(this, otherZone)) || dart.notNull(core.
identical(this.errorZone, otherZone.errorZone)); |
4358 } | 4358 } |
4359 } | 4359 } |
4360 let _delegateCache = Symbol('_delegateCache'); | 4360 let _delegateCache = Symbol('_delegateCache'); |
4361 let _map = Symbol('_map'); | 4361 let _map = Symbol('_map'); |
4362 class _CustomZone extends _Zone { | 4362 class _CustomZone extends _Zone { |
4363 get [_delegate]() { | 4363 get [_delegate]() { |
4364 if (this[_delegateCache] !== null) | 4364 if (this[_delegateCache] !== null) |
4365 return this[_delegateCache]; | 4365 return this[_delegateCache]; |
4366 this[_delegateCache] = new _ZoneDelegate(this); | 4366 this[_delegateCache] = new _ZoneDelegate(this); |
4367 return this[_delegateCache]; | 4367 return this[_delegateCache]; |
4368 } | 4368 } |
4369 _CustomZone(parent, specification, $_map) { | 4369 _CustomZone(parent, specification, map) { |
4370 this.parent = parent; | 4370 this.parent = parent; |
4371 this[_map] = $_map; | 4371 this[_map] = map; |
4372 this[_runUnary] = null; | 4372 this[_runUnary] = null; |
4373 this[_run] = null; | 4373 this[_run] = null; |
4374 this[_runBinary] = null; | 4374 this[_runBinary] = null; |
4375 this[_registerCallback] = null; | 4375 this[_registerCallback] = null; |
4376 this[_registerUnaryCallback] = null; | 4376 this[_registerUnaryCallback] = null; |
4377 this[_registerBinaryCallback] = null; | 4377 this[_registerBinaryCallback] = null; |
4378 this[_errorCallback] = null; | 4378 this[_errorCallback] = null; |
4379 this[_scheduleMicrotask] = null; | 4379 this[_scheduleMicrotask] = null; |
4380 this[_createTimer] = null; | 4380 this[_createTimer] = null; |
4381 this[_createPeriodicTimer] = null; | 4381 this[_createPeriodicTimer] = null; |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4421 } | 4421 } |
4422 runBinaryGuarded(f, arg1, arg2) { | 4422 runBinaryGuarded(f, arg1, arg2) { |
4423 try { | 4423 try { |
4424 return this.runBinary(f, arg1, arg2); | 4424 return this.runBinary(f, arg1, arg2); |
4425 } catch (e) { | 4425 } catch (e) { |
4426 let s = dart.stackTrace(e); | 4426 let s = dart.stackTrace(e); |
4427 return this.handleUncaughtError(e, s); | 4427 return this.handleUncaughtError(e, s); |
4428 } | 4428 } |
4429 | 4429 |
4430 } | 4430 } |
4431 bindCallback(f, opt$) { | 4431 bindCallback(f, opts) { |
4432 let runGuarded = opt$ && 'runGuarded' in opt$ ? opt$.runGuarded : true; | 4432 let runGuarded = opts && 'runGuarded' in opts ? opts.runGuarded : true; |
4433 let registered = this.registerCallback(f); | 4433 let registered = this.registerCallback(f); |
4434 if (runGuarded) { | 4434 if (runGuarded) { |
4435 return (() => this.runGuarded(registered)).bind(this); | 4435 return (() => this.runGuarded(registered)).bind(this); |
4436 } else { | 4436 } else { |
4437 return (() => this.run(registered)).bind(this); | 4437 return (() => this.run(registered)).bind(this); |
4438 } | 4438 } |
4439 } | 4439 } |
4440 bindUnaryCallback(f, opt$) { | 4440 bindUnaryCallback(f, opts) { |
4441 let runGuarded = opt$ && 'runGuarded' in opt$ ? opt$.runGuarded : true; | 4441 let runGuarded = opts && 'runGuarded' in opts ? opts.runGuarded : true; |
4442 let registered = this.registerUnaryCallback(f); | 4442 let registered = this.registerUnaryCallback(f); |
4443 if (runGuarded) { | 4443 if (runGuarded) { |
4444 return ((arg) => this.runUnaryGuarded(registered, arg)).bind(this); | 4444 return ((arg) => this.runUnaryGuarded(registered, arg)).bind(this); |
4445 } else { | 4445 } else { |
4446 return ((arg) => this.runUnary(registered, arg)).bind(this); | 4446 return ((arg) => this.runUnary(registered, arg)).bind(this); |
4447 } | 4447 } |
4448 } | 4448 } |
4449 bindBinaryCallback(f, opt$) { | 4449 bindBinaryCallback(f, opts) { |
4450 let runGuarded = opt$ && 'runGuarded' in opt$ ? opt$.runGuarded : true; | 4450 let runGuarded = opts && 'runGuarded' in opts ? opts.runGuarded : true; |
4451 let registered = this.registerBinaryCallback(f); | 4451 let registered = this.registerBinaryCallback(f); |
4452 if (runGuarded) { | 4452 if (runGuarded) { |
4453 return ((arg1, arg2) => this.runBinaryGuarded(registered, arg1, arg2)).b
ind(this); | 4453 return ((arg1, arg2) => this.runBinaryGuarded(registered, arg1, arg2)).b
ind(this); |
4454 } else { | 4454 } else { |
4455 return ((arg1, arg2) => this.runBinary(registered, arg1, arg2)).bind(thi
s); | 4455 return ((arg1, arg2) => this.runBinary(registered, arg1, arg2)).bind(thi
s); |
4456 } | 4456 } |
4457 } | 4457 } |
4458 get(key) { | 4458 get(key) { |
4459 let result = this[_map].get(key); | 4459 let result = this[_map].get(key); |
4460 if (dart.notNull(result !== null) || dart.notNull(this[_map].containsKey(k
ey))) | 4460 if (dart.notNull(result !== null) || dart.notNull(this[_map].containsKey(k
ey))) |
4461 return result; | 4461 return result; |
4462 if (this.parent !== null) { | 4462 if (this.parent !== null) { |
4463 let value = this.parent.get(key); | 4463 let value = this.parent.get(key); |
4464 if (value !== null) { | 4464 if (value !== null) { |
4465 this[_map].set(key, value); | 4465 this[_map].set(key, value); |
4466 } | 4466 } |
4467 return value; | 4467 return value; |
4468 } | 4468 } |
4469 dart.assert(dart.equals(this, _ROOT_ZONE)); | 4469 dart.assert(dart.equals(this, _ROOT_ZONE)); |
4470 return null; | 4470 return null; |
4471 } | 4471 } |
4472 handleUncaughtError(error, stackTrace) { | 4472 handleUncaughtError(error, stackTrace) { |
4473 let implementation = this[_handleUncaughtError]; | 4473 let implementation = this[_handleUncaughtError]; |
4474 dart.assert(implementation !== null); | 4474 dart.assert(implementation !== null); |
4475 let parentDelegate = _parentDelegate(implementation.zone); | 4475 let parentDelegate = _parentDelegate(implementation.zone); |
4476 return dart.dinvokef(implementation['function'], implementation.zone, pare
ntDelegate, this, error, stackTrace); | 4476 return dart.dinvokef(implementation.function, implementation.zone, parentD
elegate, this, error, stackTrace); |
4477 } | 4477 } |
4478 fork(opt$) { | 4478 fork(opts) { |
4479 let specification = opt$ && 'specification' in opt$ ? opt$.specification :
null; | 4479 let specification = opts && 'specification' in opts ? opts.specification :
null; |
4480 let zoneValues = opt$ && 'zoneValues' in opt$ ? opt$.zoneValues : null; | 4480 let zoneValues = opts && 'zoneValues' in opts ? opts.zoneValues : null; |
4481 let implementation = this[_fork]; | 4481 let implementation = this[_fork]; |
4482 dart.assert(implementation !== null); | 4482 dart.assert(implementation !== null); |
4483 let parentDelegate = _parentDelegate(implementation.zone); | 4483 let parentDelegate = _parentDelegate(implementation.zone); |
4484 return dart.as(dart.dinvokef(implementation['function'], implementation.zo
ne, parentDelegate, this, specification, zoneValues), Zone); | 4484 return dart.as(dart.dinvokef(implementation.function, implementation.zone,
parentDelegate, this, specification, zoneValues), Zone); |
4485 } | 4485 } |
4486 run(f) { | 4486 run(f) { |
4487 let implementation = this[_run]; | 4487 let implementation = this[_run]; |
4488 dart.assert(implementation !== null); | 4488 dart.assert(implementation !== null); |
4489 let parentDelegate = _parentDelegate(implementation.zone); | 4489 let parentDelegate = _parentDelegate(implementation.zone); |
4490 return dart.dinvokef(implementation['function'], implementation.zone, pare
ntDelegate, this, f); | 4490 return dart.dinvokef(implementation.function, implementation.zone, parentD
elegate, this, f); |
4491 } | 4491 } |
4492 runUnary(f, arg) { | 4492 runUnary(f, arg) { |
4493 let implementation = this[_runUnary]; | 4493 let implementation = this[_runUnary]; |
4494 dart.assert(implementation !== null); | 4494 dart.assert(implementation !== null); |
4495 let parentDelegate = _parentDelegate(implementation.zone); | 4495 let parentDelegate = _parentDelegate(implementation.zone); |
4496 return dart.dinvokef(implementation['function'], implementation.zone, pare
ntDelegate, this, f, arg); | 4496 return dart.dinvokef(implementation.function, implementation.zone, parentD
elegate, this, f, arg); |
4497 } | 4497 } |
4498 runBinary(f, arg1, arg2) { | 4498 runBinary(f, arg1, arg2) { |
4499 let implementation = this[_runBinary]; | 4499 let implementation = this[_runBinary]; |
4500 dart.assert(implementation !== null); | 4500 dart.assert(implementation !== null); |
4501 let parentDelegate = _parentDelegate(implementation.zone); | 4501 let parentDelegate = _parentDelegate(implementation.zone); |
4502 return dart.dinvokef(implementation['function'], implementation.zone, pare
ntDelegate, this, f, arg1, arg2); | 4502 return dart.dinvokef(implementation.function, implementation.zone, parentD
elegate, this, f, arg1, arg2); |
4503 } | 4503 } |
4504 registerCallback(f) { | 4504 registerCallback(f) { |
4505 let implementation = this[_registerCallback]; | 4505 let implementation = this[_registerCallback]; |
4506 dart.assert(implementation !== null); | 4506 dart.assert(implementation !== null); |
4507 let parentDelegate = _parentDelegate(implementation.zone); | 4507 let parentDelegate = _parentDelegate(implementation.zone); |
4508 return dart.as(dart.dinvokef(implementation['function'], implementation.zo
ne, parentDelegate, this, f), ZoneCallback); | 4508 return dart.as(dart.dinvokef(implementation.function, implementation.zone,
parentDelegate, this, f), ZoneCallback); |
4509 } | 4509 } |
4510 registerUnaryCallback(f) { | 4510 registerUnaryCallback(f) { |
4511 let implementation = this[_registerUnaryCallback]; | 4511 let implementation = this[_registerUnaryCallback]; |
4512 dart.assert(implementation !== null); | 4512 dart.assert(implementation !== null); |
4513 let parentDelegate = _parentDelegate(implementation.zone); | 4513 let parentDelegate = _parentDelegate(implementation.zone); |
4514 return dart.as(dart.dinvokef(implementation['function'], implementation.zo
ne, parentDelegate, this, f), ZoneUnaryCallback); | 4514 return dart.as(dart.dinvokef(implementation.function, implementation.zone,
parentDelegate, this, f), ZoneUnaryCallback); |
4515 } | 4515 } |
4516 registerBinaryCallback(f) { | 4516 registerBinaryCallback(f) { |
4517 let implementation = this[_registerBinaryCallback]; | 4517 let implementation = this[_registerBinaryCallback]; |
4518 dart.assert(implementation !== null); | 4518 dart.assert(implementation !== null); |
4519 let parentDelegate = _parentDelegate(implementation.zone); | 4519 let parentDelegate = _parentDelegate(implementation.zone); |
4520 return dart.as(dart.dinvokef(implementation['function'], implementation.zo
ne, parentDelegate, this, f), ZoneBinaryCallback); | 4520 return dart.as(dart.dinvokef(implementation.function, implementation.zone,
parentDelegate, this, f), ZoneBinaryCallback); |
4521 } | 4521 } |
4522 errorCallback(error, stackTrace) { | 4522 errorCallback(error, stackTrace) { |
4523 let implementation = this[_errorCallback]; | 4523 let implementation = this[_errorCallback]; |
4524 dart.assert(implementation !== null); | 4524 dart.assert(implementation !== null); |
4525 let implementationZone = implementation.zone; | 4525 let implementationZone = implementation.zone; |
4526 if (core.identical(implementationZone, _ROOT_ZONE)) | 4526 if (core.identical(implementationZone, _ROOT_ZONE)) |
4527 return null; | 4527 return null; |
4528 let parentDelegate = _parentDelegate(dart.as(implementationZone, _Zone)); | 4528 let parentDelegate = _parentDelegate(dart.as(implementationZone, _Zone)); |
4529 return dart.as(dart.dinvokef(implementation['function'], implementationZon
e, parentDelegate, this, error, stackTrace), AsyncError); | 4529 return dart.as(dart.dinvokef(implementation.function, implementationZone,
parentDelegate, this, error, stackTrace), AsyncError); |
4530 } | 4530 } |
4531 scheduleMicrotask(f) { | 4531 scheduleMicrotask(f) { |
4532 let implementation = this[_scheduleMicrotask]; | 4532 let implementation = this[_scheduleMicrotask]; |
4533 dart.assert(implementation !== null); | 4533 dart.assert(implementation !== null); |
4534 let parentDelegate = _parentDelegate(implementation.zone); | 4534 let parentDelegate = _parentDelegate(implementation.zone); |
4535 return dart.dinvokef(implementation['function'], implementation.zone, pare
ntDelegate, this, f); | 4535 return dart.dinvokef(implementation.function, implementation.zone, parentD
elegate, this, f); |
4536 } | 4536 } |
4537 createTimer(duration, f) { | 4537 createTimer(duration, f) { |
4538 let implementation = this[_createTimer]; | 4538 let implementation = this[_createTimer]; |
4539 dart.assert(implementation !== null); | 4539 dart.assert(implementation !== null); |
4540 let parentDelegate = _parentDelegate(implementation.zone); | 4540 let parentDelegate = _parentDelegate(implementation.zone); |
4541 return dart.as(dart.dinvokef(implementation['function'], implementation.zo
ne, parentDelegate, this, duration, f), Timer); | 4541 return dart.as(dart.dinvokef(implementation.function, implementation.zone,
parentDelegate, this, duration, f), Timer); |
4542 } | 4542 } |
4543 createPeriodicTimer(duration, f) { | 4543 createPeriodicTimer(duration, f) { |
4544 let implementation = this[_createPeriodicTimer]; | 4544 let implementation = this[_createPeriodicTimer]; |
4545 dart.assert(implementation !== null); | 4545 dart.assert(implementation !== null); |
4546 let parentDelegate = _parentDelegate(implementation.zone); | 4546 let parentDelegate = _parentDelegate(implementation.zone); |
4547 return dart.as(dart.dinvokef(implementation['function'], implementation.zo
ne, parentDelegate, this, duration, f), Timer); | 4547 return dart.as(dart.dinvokef(implementation.function, implementation.zone,
parentDelegate, this, duration, f), Timer); |
4548 } | 4548 } |
4549 print(line) { | 4549 print(line) { |
4550 let implementation = this[_print]; | 4550 let implementation = this[_print]; |
4551 dart.assert(implementation !== null); | 4551 dart.assert(implementation !== null); |
4552 let parentDelegate = _parentDelegate(implementation.zone); | 4552 let parentDelegate = _parentDelegate(implementation.zone); |
4553 return dart.dinvokef(implementation['function'], implementation.zone, pare
ntDelegate, this, line); | 4553 return dart.dinvokef(implementation.function, implementation.zone, parentD
elegate, this, line); |
4554 } | 4554 } |
4555 } | 4555 } |
4556 // Function _rootHandleUncaughtError: (Zone, ZoneDelegate, Zone, dynamic, Stac
kTrace) → void | 4556 // Function _rootHandleUncaughtError: (Zone, ZoneDelegate, Zone, dynamic, Stac
kTrace) → void |
4557 function _rootHandleUncaughtError(self, parent, zone, error, stackTrace) { | 4557 function _rootHandleUncaughtError(self, parent, zone, error, stackTrace) { |
4558 _schedulePriorityAsyncCallback(() => { | 4558 _schedulePriorityAsyncCallback(() => { |
4559 throw new _UncaughtAsyncError(error, stackTrace); | 4559 throw new _UncaughtAsyncError(error, stackTrace); |
4560 }); | 4560 }); |
4561 } | 4561 } |
4562 // Function _rootRun: (Zone, ZoneDelegate, Zone, () → dynamic) → dynamic | 4562 // Function _rootRun: (Zone, ZoneDelegate, Zone, () → dynamic) → dynamic |
4563 function _rootRun(self, parent, zone, f) { | 4563 function _rootRun(self, parent, zone, f) { |
4564 if (dart.equals(Zone[_current], zone)) | 4564 if (dart.equals(Zone[_current$], zone)) |
4565 return f(); | 4565 return f(); |
4566 let old = Zone._enter(zone); | 4566 let old = Zone._enter(zone); |
4567 try { | 4567 try { |
4568 return f(); | 4568 return f(); |
4569 } finally { | 4569 } finally { |
4570 Zone._leave(old); | 4570 Zone._leave(old); |
4571 } | 4571 } |
4572 } | 4572 } |
4573 // Function _rootRunUnary: (Zone, ZoneDelegate, Zone, (dynamic) → dynamic, dyn
amic) → dynamic | 4573 // Function _rootRunUnary: (Zone, ZoneDelegate, Zone, (dynamic) → dynamic, dyn
amic) → dynamic |
4574 function _rootRunUnary(self, parent, zone, f, arg) { | 4574 function _rootRunUnary(self, parent, zone, f, arg) { |
4575 if (dart.equals(Zone[_current], zone)) | 4575 if (dart.equals(Zone[_current$], zone)) |
4576 return dart.dinvokef(f, arg); | 4576 return dart.dinvokef(f, arg); |
4577 let old = Zone._enter(zone); | 4577 let old = Zone._enter(zone); |
4578 try { | 4578 try { |
4579 return dart.dinvokef(f, arg); | 4579 return dart.dinvokef(f, arg); |
4580 } finally { | 4580 } finally { |
4581 Zone._leave(old); | 4581 Zone._leave(old); |
4582 } | 4582 } |
4583 } | 4583 } |
4584 // Function _rootRunBinary: (Zone, ZoneDelegate, Zone, (dynamic, dynamic) → dy
namic, dynamic, dynamic) → dynamic | 4584 // Function _rootRunBinary: (Zone, ZoneDelegate, Zone, (dynamic, dynamic) → dy
namic, dynamic, dynamic) → dynamic |
4585 function _rootRunBinary(self, parent, zone, f, arg1, arg2) { | 4585 function _rootRunBinary(self, parent, zone, f, arg1, arg2) { |
4586 if (dart.equals(Zone[_current], zone)) | 4586 if (dart.equals(Zone[_current$], zone)) |
4587 return dart.dinvokef(f, arg1, arg2); | 4587 return dart.dinvokef(f, arg1, arg2); |
4588 let old = Zone._enter(zone); | 4588 let old = Zone._enter(zone); |
4589 try { | 4589 try { |
4590 return dart.dinvokef(f, arg1, arg2); | 4590 return dart.dinvokef(f, arg1, arg2); |
4591 } finally { | 4591 } finally { |
4592 Zone._leave(old); | 4592 Zone._leave(old); |
4593 } | 4593 } |
4594 } | 4594 } |
4595 // Function _rootRegisterCallback: (Zone, ZoneDelegate, Zone, () → dynamic) →
ZoneCallback | 4595 // Function _rootRegisterCallback: (Zone, ZoneDelegate, Zone, () → dynamic) →
ZoneCallback |
4596 function _rootRegisterCallback(self, parent, zone, f) { | 4596 function _rootRegisterCallback(self, parent, zone, f) { |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4751 get [_delegate]() { | 4751 get [_delegate]() { |
4752 if (_rootDelegate !== null) | 4752 if (_rootDelegate !== null) |
4753 return _rootDelegate; | 4753 return _rootDelegate; |
4754 return _rootDelegate = new _ZoneDelegate(this); | 4754 return _rootDelegate = new _ZoneDelegate(this); |
4755 } | 4755 } |
4756 get errorZone() { | 4756 get errorZone() { |
4757 return this; | 4757 return this; |
4758 } | 4758 } |
4759 runGuarded(f) { | 4759 runGuarded(f) { |
4760 try { | 4760 try { |
4761 if (core.identical(_ROOT_ZONE, Zone[_current])) { | 4761 if (core.identical(_ROOT_ZONE, Zone[_current$])) { |
4762 return f(); | 4762 return f(); |
4763 } | 4763 } |
4764 return _rootRun(null, null, this, f); | 4764 return _rootRun(null, null, this, f); |
4765 } catch (e) { | 4765 } catch (e) { |
4766 let s = dart.stackTrace(e); | 4766 let s = dart.stackTrace(e); |
4767 return this.handleUncaughtError(e, s); | 4767 return this.handleUncaughtError(e, s); |
4768 } | 4768 } |
4769 | 4769 |
4770 } | 4770 } |
4771 runUnaryGuarded(f, arg) { | 4771 runUnaryGuarded(f, arg) { |
4772 try { | 4772 try { |
4773 if (core.identical(_ROOT_ZONE, Zone[_current])) { | 4773 if (core.identical(_ROOT_ZONE, Zone[_current$])) { |
4774 return dart.dinvokef(f, arg); | 4774 return dart.dinvokef(f, arg); |
4775 } | 4775 } |
4776 return _rootRunUnary(null, null, this, f, arg); | 4776 return _rootRunUnary(null, null, this, f, arg); |
4777 } catch (e) { | 4777 } catch (e) { |
4778 let s = dart.stackTrace(e); | 4778 let s = dart.stackTrace(e); |
4779 return this.handleUncaughtError(e, s); | 4779 return this.handleUncaughtError(e, s); |
4780 } | 4780 } |
4781 | 4781 |
4782 } | 4782 } |
4783 runBinaryGuarded(f, arg1, arg2) { | 4783 runBinaryGuarded(f, arg1, arg2) { |
4784 try { | 4784 try { |
4785 if (core.identical(_ROOT_ZONE, Zone[_current])) { | 4785 if (core.identical(_ROOT_ZONE, Zone[_current$])) { |
4786 return dart.dinvokef(f, arg1, arg2); | 4786 return dart.dinvokef(f, arg1, arg2); |
4787 } | 4787 } |
4788 return _rootRunBinary(null, null, this, f, arg1, arg2); | 4788 return _rootRunBinary(null, null, this, f, arg1, arg2); |
4789 } catch (e) { | 4789 } catch (e) { |
4790 let s = dart.stackTrace(e); | 4790 let s = dart.stackTrace(e); |
4791 return this.handleUncaughtError(e, s); | 4791 return this.handleUncaughtError(e, s); |
4792 } | 4792 } |
4793 | 4793 |
4794 } | 4794 } |
4795 bindCallback(f, opt$) { | 4795 bindCallback(f, opts) { |
4796 let runGuarded = opt$ && 'runGuarded' in opt$ ? opt$.runGuarded : true; | 4796 let runGuarded = opts && 'runGuarded' in opts ? opts.runGuarded : true; |
4797 if (runGuarded) { | 4797 if (runGuarded) { |
4798 return (() => this.runGuarded(f)).bind(this); | 4798 return (() => this.runGuarded(f)).bind(this); |
4799 } else { | 4799 } else { |
4800 return (() => this.run(f)).bind(this); | 4800 return (() => this.run(f)).bind(this); |
4801 } | 4801 } |
4802 } | 4802 } |
4803 bindUnaryCallback(f, opt$) { | 4803 bindUnaryCallback(f, opts) { |
4804 let runGuarded = opt$ && 'runGuarded' in opt$ ? opt$.runGuarded : true; | 4804 let runGuarded = opts && 'runGuarded' in opts ? opts.runGuarded : true; |
4805 if (runGuarded) { | 4805 if (runGuarded) { |
4806 return ((arg) => this.runUnaryGuarded(f, arg)).bind(this); | 4806 return ((arg) => this.runUnaryGuarded(f, arg)).bind(this); |
4807 } else { | 4807 } else { |
4808 return ((arg) => this.runUnary(f, arg)).bind(this); | 4808 return ((arg) => this.runUnary(f, arg)).bind(this); |
4809 } | 4809 } |
4810 } | 4810 } |
4811 bindBinaryCallback(f, opt$) { | 4811 bindBinaryCallback(f, opts) { |
4812 let runGuarded = opt$ && 'runGuarded' in opt$ ? opt$.runGuarded : true; | 4812 let runGuarded = opts && 'runGuarded' in opts ? opts.runGuarded : true; |
4813 if (runGuarded) { | 4813 if (runGuarded) { |
4814 return ((arg1, arg2) => this.runBinaryGuarded(f, arg1, arg2)).bind(this)
; | 4814 return ((arg1, arg2) => this.runBinaryGuarded(f, arg1, arg2)).bind(this)
; |
4815 } else { | 4815 } else { |
4816 return ((arg1, arg2) => this.runBinary(f, arg1, arg2)).bind(this); | 4816 return ((arg1, arg2) => this.runBinary(f, arg1, arg2)).bind(this); |
4817 } | 4817 } |
4818 } | 4818 } |
4819 get(key) { | 4819 get(key) { |
4820 return null; | 4820 return null; |
4821 } | 4821 } |
4822 handleUncaughtError(error, stackTrace) { | 4822 handleUncaughtError(error, stackTrace) { |
4823 return _rootHandleUncaughtError(null, null, this, error, stackTrace); | 4823 return _rootHandleUncaughtError(null, null, this, error, stackTrace); |
4824 } | 4824 } |
4825 fork(opt$) { | 4825 fork(opts) { |
4826 let specification = opt$ && 'specification' in opt$ ? opt$.specification :
null; | 4826 let specification = opts && 'specification' in opts ? opts.specification :
null; |
4827 let zoneValues = opt$ && 'zoneValues' in opt$ ? opt$.zoneValues : null; | 4827 let zoneValues = opts && 'zoneValues' in opts ? opts.zoneValues : null; |
4828 return _rootFork(null, null, this, specification, zoneValues); | 4828 return _rootFork(null, null, this, specification, zoneValues); |
4829 } | 4829 } |
4830 run(f) { | 4830 run(f) { |
4831 if (core.identical(Zone[_current], _ROOT_ZONE)) | 4831 if (core.identical(Zone[_current$], _ROOT_ZONE)) |
4832 return f(); | 4832 return f(); |
4833 return _rootRun(null, null, this, f); | 4833 return _rootRun(null, null, this, f); |
4834 } | 4834 } |
4835 runUnary(f, arg) { | 4835 runUnary(f, arg) { |
4836 if (core.identical(Zone[_current], _ROOT_ZONE)) | 4836 if (core.identical(Zone[_current$], _ROOT_ZONE)) |
4837 return dart.dinvokef(f, arg); | 4837 return dart.dinvokef(f, arg); |
4838 return _rootRunUnary(null, null, this, f, arg); | 4838 return _rootRunUnary(null, null, this, f, arg); |
4839 } | 4839 } |
4840 runBinary(f, arg1, arg2) { | 4840 runBinary(f, arg1, arg2) { |
4841 if (core.identical(Zone[_current], _ROOT_ZONE)) | 4841 if (core.identical(Zone[_current$], _ROOT_ZONE)) |
4842 return dart.dinvokef(f, arg1, arg2); | 4842 return dart.dinvokef(f, arg1, arg2); |
4843 return _rootRunBinary(null, null, this, f, arg1, arg2); | 4843 return _rootRunBinary(null, null, this, f, arg1, arg2); |
4844 } | 4844 } |
4845 registerCallback(f) { | 4845 registerCallback(f) { |
4846 return f; | 4846 return f; |
4847 } | 4847 } |
4848 registerUnaryCallback(f) { | 4848 registerUnaryCallback(f) { |
4849 return f; | 4849 return f; |
4850 } | 4850 } |
4851 registerBinaryCallback(f) { | 4851 registerBinaryCallback(f) { |
(...skipping 17 matching lines...) Expand all Loading... |
4869 } | 4869 } |
4870 _RootZone._rootDelegate = null; | 4870 _RootZone._rootDelegate = null; |
4871 dart.defineLazyProperties(_RootZone, { | 4871 dart.defineLazyProperties(_RootZone, { |
4872 get _rootMap() { | 4872 get _rootMap() { |
4873 return new collection.HashMap(); | 4873 return new collection.HashMap(); |
4874 }, | 4874 }, |
4875 set _rootMap(_) {} | 4875 set _rootMap(_) {} |
4876 }); | 4876 }); |
4877 let _ROOT_ZONE = new _RootZone(); | 4877 let _ROOT_ZONE = new _RootZone(); |
4878 // Function runZoned: (() → dynamic, {zoneValues: Map<dynamic, dynamic>, zoneS
pecification: ZoneSpecification, onError: Function}) → dynamic | 4878 // Function runZoned: (() → dynamic, {zoneValues: Map<dynamic, dynamic>, zoneS
pecification: ZoneSpecification, onError: Function}) → dynamic |
4879 function runZoned(body, opt$) { | 4879 function runZoned(body, opts) { |
4880 let zoneValues = opt$ && 'zoneValues' in opt$ ? opt$.zoneValues : null; | 4880 let zoneValues = opts && 'zoneValues' in opts ? opts.zoneValues : null; |
4881 let zoneSpecification = opt$ && 'zoneSpecification' in opt$ ? opt$.zoneSpeci
fication : null; | 4881 let zoneSpecification = opts && 'zoneSpecification' in opts ? opts.zoneSpeci
fication : null; |
4882 let onError = opt$ && 'onError' in opt$ ? opt$.onError : null; | 4882 let onError = opts && 'onError' in opts ? opts.onError : null; |
4883 let errorHandler = null; | 4883 let errorHandler = null; |
4884 if (onError !== null) { | 4884 if (onError !== null) { |
4885 errorHandler = (self, parent, zone, error, stackTrace) => { | 4885 errorHandler = (self, parent, zone, error, stackTrace) => { |
4886 try { | 4886 try { |
4887 if (dart.is(onError, ZoneBinaryCallback)) { | 4887 if (dart.is(onError, ZoneBinaryCallback)) { |
4888 return self.parent.runBinary(onError, error, stackTrace); | 4888 return self.parent.runBinary(onError, error, stackTrace); |
4889 } | 4889 } |
4890 return self.parent.runUnary(dart.as(onError, dart.throw_("Unimplemente
d type (dynamic) → dynamic")), error); | 4890 return self.parent.runUnary(dart.as(onError, dart.throw_("Unimplemente
d type (dynamic) → dynamic")), error); |
4891 } catch (e) { | 4891 } catch (e) { |
4892 let s = dart.stackTrace(e); | 4892 let s = dart.stackTrace(e); |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4943 exports.StreamIterator = StreamIterator; | 4943 exports.StreamIterator = StreamIterator; |
4944 exports.StreamIterator$ = StreamIterator$; | 4944 exports.StreamIterator$ = StreamIterator$; |
4945 exports.StreamController = StreamController; | 4945 exports.StreamController = StreamController; |
4946 exports.StreamController$ = StreamController$; | 4946 exports.StreamController$ = StreamController$; |
4947 exports.Timer = Timer; | 4947 exports.Timer = Timer; |
4948 exports.ZoneSpecification = ZoneSpecification; | 4948 exports.ZoneSpecification = ZoneSpecification; |
4949 exports.ZoneDelegate = ZoneDelegate; | 4949 exports.ZoneDelegate = ZoneDelegate; |
4950 exports.Zone = Zone; | 4950 exports.Zone = Zone; |
4951 exports.runZoned = runZoned; | 4951 exports.runZoned = runZoned; |
4952 })(async || (async = {})); | 4952 })(async || (async = {})); |
OLD | NEW |