| OLD | NEW |
| 1 dart_library.library('dart/async', null, /* Imports */[ | 1 dart_library.library('dart/async', null, /* Imports */[ |
| 2 "dart_runtime/dart", | 2 "dart_runtime/dart", |
| 3 'dart/core', | 3 'dart/core', |
| 4 'dart/_internal', | 4 'dart/_internal', |
| 5 'dart/collection' | 5 'dart/collection' |
| 6 ], /* Lazy imports */[ | 6 ], /* Lazy imports */[ |
| 7 'dart/_isolate_helper' | 7 'dart/_isolate_helper' |
| 8 ], function(exports, dart, core, _internal, collection, _isolate_helper) { | 8 ], function(exports, dart, core, _internal, collection, _isolate_helper) { |
| 9 'use strict'; | 9 'use strict'; |
| 10 let dartx = dart.dartx; | 10 let dartx = dart.dartx; |
| (...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 644 let future = new (_Future$(T))(); | 644 let future = new (_Future$(T))(); |
| 645 let subscription = null; | 645 let subscription = null; |
| 646 let elementIndex = 0; | 646 let elementIndex = 0; |
| 647 subscription = this.listen(dart.fn(value => { | 647 subscription = this.listen(dart.fn(value => { |
| 648 dart.as(value, T); | 648 dart.as(value, T); |
| 649 if (index == elementIndex) { | 649 if (index == elementIndex) { |
| 650 _cancelAndValue(subscription, future, value); | 650 _cancelAndValue(subscription, future, value); |
| 651 return; | 651 return; |
| 652 } | 652 } |
| 653 elementIndex = dart.notNull(elementIndex) + 1; | 653 elementIndex = dart.notNull(elementIndex) + 1; |
| 654 }, dart.dynamic, [T]), {onError: dart.bind(future, _completeError), onDo
ne: dart.fn(() => { | 654 }, dart.dynamic, [T]), {onError: dart.bind(future, _completeError), onDo
ne: dart.fn((() => { |
| 655 future[_completeError](core.RangeError.index(index, this, "index", n
ull, elementIndex)); | 655 future[_completeError](core.RangeError.index(index, this, "index", n
ull, elementIndex)); |
| 656 }), cancelOnError: true}); | 656 }).bind(this)), cancelOnError: true}); |
| 657 return future; | 657 return future; |
| 658 } | 658 } |
| 659 timeout(timeLimit, opts) { | 659 timeout(timeLimit, opts) { |
| 660 let onTimeout = opts && 'onTimeout' in opts ? opts.onTimeout : null; | 660 let onTimeout = opts && 'onTimeout' in opts ? opts.onTimeout : null; |
| 661 dart.as(onTimeout, dart.functionType(dart.void, [EventSink])); | 661 dart.as(onTimeout, dart.functionType(dart.void, [EventSink])); |
| 662 let controller = null; | 662 let controller = null; |
| 663 let subscription = null; | 663 let subscription = null; |
| 664 let timer = null; | 664 let timer = null; |
| 665 let zone = null; | 665 let zone = null; |
| 666 let timeout = null; | 666 let timeout = null; |
| (...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 973 this[_cancel](); | 973 this[_cancel](); |
| 974 return this[_cancelFuture]; | 974 return this[_cancelFuture]; |
| 975 } | 975 } |
| 976 asFuture(futureValue) { | 976 asFuture(futureValue) { |
| 977 if (futureValue === void 0) | 977 if (futureValue === void 0) |
| 978 futureValue = null; | 978 futureValue = null; |
| 979 let result = new (_Future$(T))(); | 979 let result = new (_Future$(T))(); |
| 980 this[_onDone] = dart.fn(() => { | 980 this[_onDone] = dart.fn(() => { |
| 981 result[_complete](futureValue); | 981 result[_complete](futureValue); |
| 982 }); | 982 }); |
| 983 this[_onError] = dart.fn((error, stackTrace) => { | 983 this[_onError] = dart.fn(((error, stackTrace) => { |
| 984 this.cancel(); | 984 this.cancel(); |
| 985 result[_completeError](error, dart.as(stackTrace, core.StackTrace)); | 985 result[_completeError](error, dart.as(stackTrace, core.StackTrace)); |
| 986 }); | 986 }).bind(this)); |
| 987 return result; | 987 return result; |
| 988 } | 988 } |
| 989 get [_isInputPaused]() { | 989 get [_isInputPaused]() { |
| 990 return (dart.notNull(this[_state]) & dart.notNull(_BufferingStreamSubscr
iption$()._STATE_INPUT_PAUSED)) != 0; | 990 return (dart.notNull(this[_state]) & dart.notNull(_BufferingStreamSubscr
iption$()._STATE_INPUT_PAUSED)) != 0; |
| 991 } | 991 } |
| 992 get [_isClosed]() { | 992 get [_isClosed]() { |
| 993 return (dart.notNull(this[_state]) & dart.notNull(_BufferingStreamSubscr
iption$()._STATE_CLOSED)) != 0; | 993 return (dart.notNull(this[_state]) & dart.notNull(_BufferingStreamSubscr
iption$()._STATE_CLOSED)) != 0; |
| 994 } | 994 } |
| 995 get [_isCanceled]() { | 995 get [_isCanceled]() { |
| 996 return (dart.notNull(this[_state]) & dart.notNull(_BufferingStreamSubscr
iption$()._STATE_CANCELED)) != 0; | 996 return (dart.notNull(this[_state]) & dart.notNull(_BufferingStreamSubscr
iption$()._STATE_CANCELED)) != 0; |
| (...skipping 1332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2329 dart.assert(!dart.notNull(this[_isComplete])); | 2329 dart.assert(!dart.notNull(this[_isComplete])); |
| 2330 this[_state] = _Future$()._ERROR; | 2330 this[_state] = _Future$()._ERROR; |
| 2331 this[_resultOrListeners] = error; | 2331 this[_resultOrListeners] = error; |
| 2332 } | 2332 } |
| 2333 [_setError](error, stackTrace) { | 2333 [_setError](error, stackTrace) { |
| 2334 this[_setErrorObject](new AsyncError(error, stackTrace)); | 2334 this[_setErrorObject](new AsyncError(error, stackTrace)); |
| 2335 } | 2335 } |
| 2336 [_addListener](listener) { | 2336 [_addListener](listener) { |
| 2337 dart.assert(listener[_nextListener] == null); | 2337 dart.assert(listener[_nextListener] == null); |
| 2338 if (dart.notNull(this[_isComplete])) { | 2338 if (dart.notNull(this[_isComplete])) { |
| 2339 this[_zone].scheduleMicrotask(dart.fn(() => { | 2339 this[_zone].scheduleMicrotask(dart.fn((() => { |
| 2340 _Future$()._propagateToListeners(this, listener); | 2340 _Future$()._propagateToListeners(this, listener); |
| 2341 })); | 2341 }).bind(this))); |
| 2342 } else { | 2342 } else { |
| 2343 listener[_nextListener] = dart.as(this[_resultOrListeners], _FutureLis
tener); | 2343 listener[_nextListener] = dart.as(this[_resultOrListeners], _FutureLis
tener); |
| 2344 this[_resultOrListeners] = listener; | 2344 this[_resultOrListeners] = listener; |
| 2345 } | 2345 } |
| 2346 } | 2346 } |
| 2347 [_removeListeners]() { | 2347 [_removeListeners]() { |
| 2348 dart.assert(!dart.notNull(this[_isComplete])); | 2348 dart.assert(!dart.notNull(this[_isComplete])); |
| 2349 let current = dart.as(this[_resultOrListeners], _FutureListener); | 2349 let current = dart.as(this[_resultOrListeners], _FutureListener); |
| 2350 this[_resultOrListeners] = null; | 2350 this[_resultOrListeners] = null; |
| 2351 let prev = null; | 2351 let prev = null; |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2413 } | 2413 } |
| 2414 [_asyncComplete](value) { | 2414 [_asyncComplete](value) { |
| 2415 dart.assert(!dart.notNull(this[_isComplete])); | 2415 dart.assert(!dart.notNull(this[_isComplete])); |
| 2416 if (value == null) { | 2416 if (value == null) { |
| 2417 } else if (dart.is(value, Future)) { | 2417 } else if (dart.is(value, Future)) { |
| 2418 let typedFuture = dart.as(value, Future$(T)); | 2418 let typedFuture = dart.as(value, Future$(T)); |
| 2419 if (dart.is(typedFuture, _Future$())) { | 2419 if (dart.is(typedFuture, _Future$())) { |
| 2420 let coreFuture = dart.as(typedFuture, _Future$(T)); | 2420 let coreFuture = dart.as(typedFuture, _Future$(T)); |
| 2421 if (dart.notNull(coreFuture[_isComplete]) && dart.notNull(coreFuture
[_hasError])) { | 2421 if (dart.notNull(coreFuture[_isComplete]) && dart.notNull(coreFuture
[_hasError])) { |
| 2422 this[_markPendingCompletion](); | 2422 this[_markPendingCompletion](); |
| 2423 this[_zone].scheduleMicrotask(dart.fn(() => { | 2423 this[_zone].scheduleMicrotask(dart.fn((() => { |
| 2424 _Future$()._chainCoreFuture(coreFuture, this); | 2424 _Future$()._chainCoreFuture(coreFuture, this); |
| 2425 })); | 2425 }).bind(this))); |
| 2426 } else { | 2426 } else { |
| 2427 _Future$()._chainCoreFuture(coreFuture, this); | 2427 _Future$()._chainCoreFuture(coreFuture, this); |
| 2428 } | 2428 } |
| 2429 } else { | 2429 } else { |
| 2430 _Future$()._chainForeignFuture(typedFuture, this); | 2430 _Future$()._chainForeignFuture(typedFuture, this); |
| 2431 } | 2431 } |
| 2432 return; | 2432 return; |
| 2433 } else { | 2433 } else { |
| 2434 let typedValue = dart.as(value, T); | 2434 let typedValue = dart.as(value, T); |
| 2435 } | 2435 } |
| 2436 this[_markPendingCompletion](); | 2436 this[_markPendingCompletion](); |
| 2437 this[_zone].scheduleMicrotask(dart.fn(() => { | 2437 this[_zone].scheduleMicrotask(dart.fn((() => { |
| 2438 this[_completeWithValue](value); | 2438 this[_completeWithValue](value); |
| 2439 })); | 2439 }).bind(this))); |
| 2440 } | 2440 } |
| 2441 [_asyncCompleteError](error, stackTrace) { | 2441 [_asyncCompleteError](error, stackTrace) { |
| 2442 dart.assert(!dart.notNull(this[_isComplete])); | 2442 dart.assert(!dart.notNull(this[_isComplete])); |
| 2443 this[_markPendingCompletion](); | 2443 this[_markPendingCompletion](); |
| 2444 this[_zone].scheduleMicrotask(dart.fn(() => { | 2444 this[_zone].scheduleMicrotask(dart.fn((() => { |
| 2445 this[_completeError](error, stackTrace); | 2445 this[_completeError](error, stackTrace); |
| 2446 })); | 2446 }).bind(this))); |
| 2447 } | 2447 } |
| 2448 static _propagateToListeners(source, listeners) { | 2448 static _propagateToListeners(source, listeners) { |
| 2449 while (true) { | 2449 while (true) { |
| 2450 dart.assert(source[_isComplete]); | 2450 dart.assert(source[_isComplete]); |
| 2451 let hasError = source[_hasError]; | 2451 let hasError = source[_hasError]; |
| 2452 if (listeners == null) { | 2452 if (listeners == null) { |
| 2453 if (dart.notNull(hasError)) { | 2453 if (dart.notNull(hasError)) { |
| 2454 let asyncError = source[_error]; | 2454 let asyncError = source[_error]; |
| 2455 source[_zone].handleUncaughtError(asyncError.error, asyncError.sta
ckTrace); | 2455 source[_zone].handleUncaughtError(asyncError.error, asyncError.sta
ckTrace); |
| 2456 } | 2456 } |
| (...skipping 721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3178 let pendingEvents = this[_pendingEvents]; | 3178 let pendingEvents = this[_pendingEvents]; |
| 3179 this[_state] = dart.notNull(this[_state]) | dart.notNull(_StreamControll
er$()._STATE_SUBSCRIBED); | 3179 this[_state] = dart.notNull(this[_state]) | dart.notNull(_StreamControll
er$()._STATE_SUBSCRIBED); |
| 3180 if (dart.notNull(this[_isAddingStream])) { | 3180 if (dart.notNull(this[_isAddingStream])) { |
| 3181 let addState = dart.as(this[_varData], _StreamControllerAddStreamState
); | 3181 let addState = dart.as(this[_varData], _StreamControllerAddStreamState
); |
| 3182 addState.varData = subscription; | 3182 addState.varData = subscription; |
| 3183 addState.resume(); | 3183 addState.resume(); |
| 3184 } else { | 3184 } else { |
| 3185 this[_varData] = subscription; | 3185 this[_varData] = subscription; |
| 3186 } | 3186 } |
| 3187 subscription[_setPendingEvents](pendingEvents); | 3187 subscription[_setPendingEvents](pendingEvents); |
| 3188 subscription[_guardCallback](dart.fn(() => { | 3188 subscription[_guardCallback](dart.fn((() => { |
| 3189 _runGuarded(this[_onListen]); | 3189 _runGuarded(this[_onListen]); |
| 3190 })); | 3190 }).bind(this))); |
| 3191 return dart.as(subscription, StreamSubscription$(T)); | 3191 return dart.as(subscription, StreamSubscription$(T)); |
| 3192 } | 3192 } |
| 3193 [_recordCancel](subscription) { | 3193 [_recordCancel](subscription) { |
| 3194 dart.as(subscription, StreamSubscription$(T)); | 3194 dart.as(subscription, StreamSubscription$(T)); |
| 3195 let result = null; | 3195 let result = null; |
| 3196 if (dart.notNull(this[_isAddingStream])) { | 3196 if (dart.notNull(this[_isAddingStream])) { |
| 3197 let addState = dart.as(this[_varData], _StreamControllerAddStreamState
); | 3197 let addState = dart.as(this[_varData], _StreamControllerAddStreamState
); |
| 3198 result = addState.cancel(); | 3198 result = addState.cancel(); |
| 3199 } | 3199 } |
| 3200 this[_varData] = null; | 3200 this[_varData] = null; |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3450 } | 3450 } |
| 3451 resume() { | 3451 resume() { |
| 3452 this.addSubscription.resume(); | 3452 this.addSubscription.resume(); |
| 3453 } | 3453 } |
| 3454 cancel() { | 3454 cancel() { |
| 3455 let cancel = this.addSubscription.cancel(); | 3455 let cancel = this.addSubscription.cancel(); |
| 3456 if (cancel == null) { | 3456 if (cancel == null) { |
| 3457 this.addStreamFuture[_asyncComplete](null); | 3457 this.addStreamFuture[_asyncComplete](null); |
| 3458 return null; | 3458 return null; |
| 3459 } | 3459 } |
| 3460 return cancel.whenComplete(dart.fn(() => { | 3460 return cancel.whenComplete(dart.fn((() => { |
| 3461 this.addStreamFuture[_asyncComplete](null); | 3461 this.addStreamFuture[_asyncComplete](null); |
| 3462 })); | 3462 }).bind(this))); |
| 3463 } | 3463 } |
| 3464 complete() { | 3464 complete() { |
| 3465 this.addStreamFuture[_asyncComplete](null); | 3465 this.addStreamFuture[_asyncComplete](null); |
| 3466 } | 3466 } |
| 3467 } | 3467 } |
| 3468 dart.setSignature(_AddStreamState, { | 3468 dart.setSignature(_AddStreamState, { |
| 3469 constructors: () => ({_AddStreamState: [_AddStreamState$(T), [_EventSink$(
T), Stream, core.bool]]}), | 3469 constructors: () => ({_AddStreamState: [_AddStreamState$(T), [_EventSink$(
T), Stream, core.bool]]}), |
| 3470 methods: () => ({ | 3470 methods: () => ({ |
| 3471 pause: [dart.void, []], | 3471 pause: [dart.void, []], |
| 3472 resume: [dart.void, []], | 3472 resume: [dart.void, []], |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3525 [_createSubscription](onData, onError, onDone, cancelOnError) { | 3525 [_createSubscription](onData, onError, onDone, cancelOnError) { |
| 3526 dart.as(onData, dart.functionType(dart.void, [T])); | 3526 dart.as(onData, dart.functionType(dart.void, [T])); |
| 3527 dart.as(onDone, dart.functionType(dart.void, [])); | 3527 dart.as(onDone, dart.functionType(dart.void, [])); |
| 3528 if (dart.notNull(this[_isUsed])) | 3528 if (dart.notNull(this[_isUsed])) |
| 3529 dart.throw(new core.StateError("Stream has already been listened to.")
); | 3529 dart.throw(new core.StateError("Stream has already been listened to.")
); |
| 3530 this[_isUsed] = true; | 3530 this[_isUsed] = true; |
| 3531 return dart.as((() => { | 3531 return dart.as((() => { |
| 3532 let _ = new _BufferingStreamSubscription(onData, onError, onDone, canc
elOnError); | 3532 let _ = new _BufferingStreamSubscription(onData, onError, onDone, canc
elOnError); |
| 3533 _[_setPendingEvents](this[_pending]()); | 3533 _[_setPendingEvents](this[_pending]()); |
| 3534 return _; | 3534 return _; |
| 3535 })(), StreamSubscription$(T)); | 3535 }).bind(this)(), StreamSubscription$(T)); |
| 3536 } | 3536 } |
| 3537 } | 3537 } |
| 3538 dart.setSignature(_GeneratedStreamImpl, { | 3538 dart.setSignature(_GeneratedStreamImpl, { |
| 3539 constructors: () => ({_GeneratedStreamImpl: [_GeneratedStreamImpl$(T), [_E
ventGenerator]]}), | 3539 constructors: () => ({_GeneratedStreamImpl: [_GeneratedStreamImpl$(T), [_E
ventGenerator]]}), |
| 3540 methods: () => ({[_createSubscription]: [StreamSubscription$(T), [dart.fun
ctionType(dart.void, [T]), core.Function, dart.functionType(dart.void, []), core
.bool]]}) | 3540 methods: () => ({[_createSubscription]: [StreamSubscription$(T), [dart.fun
ctionType(dart.void, [T]), core.Function, dart.functionType(dart.void, []), core
.bool]]}) |
| 3541 }); | 3541 }); |
| 3542 return _GeneratedStreamImpl; | 3542 return _GeneratedStreamImpl; |
| 3543 }); | 3543 }); |
| 3544 let _GeneratedStreamImpl = _GeneratedStreamImpl$(); | 3544 let _GeneratedStreamImpl = _GeneratedStreamImpl$(); |
| 3545 let _eventScheduled = Symbol('_eventScheduled'); | 3545 let _eventScheduled = Symbol('_eventScheduled'); |
| 3546 class _PendingEvents extends core.Object { | 3546 class _PendingEvents extends core.Object { |
| 3547 _PendingEvents() { | 3547 _PendingEvents() { |
| 3548 this[_state] = _PendingEvents._STATE_UNSCHEDULED; | 3548 this[_state] = _PendingEvents._STATE_UNSCHEDULED; |
| 3549 } | 3549 } |
| 3550 get isScheduled() { | 3550 get isScheduled() { |
| 3551 return this[_state] == _PendingEvents._STATE_SCHEDULED; | 3551 return this[_state] == _PendingEvents._STATE_SCHEDULED; |
| 3552 } | 3552 } |
| 3553 get [_eventScheduled]() { | 3553 get [_eventScheduled]() { |
| 3554 return dart.notNull(this[_state]) >= dart.notNull(_PendingEvents._STATE_SC
HEDULED); | 3554 return dart.notNull(this[_state]) >= dart.notNull(_PendingEvents._STATE_SC
HEDULED); |
| 3555 } | 3555 } |
| 3556 schedule(dispatch) { | 3556 schedule(dispatch) { |
| 3557 if (dart.notNull(this.isScheduled)) | 3557 if (dart.notNull(this.isScheduled)) |
| 3558 return; | 3558 return; |
| 3559 dart.assert(!dart.notNull(this.isEmpty)); | 3559 dart.assert(!dart.notNull(this.isEmpty)); |
| 3560 if (dart.notNull(this[_eventScheduled])) { | 3560 if (dart.notNull(this[_eventScheduled])) { |
| 3561 dart.assert(this[_state] == _PendingEvents._STATE_CANCELED); | 3561 dart.assert(this[_state] == _PendingEvents._STATE_CANCELED); |
| 3562 this[_state] = _PendingEvents._STATE_SCHEDULED; | 3562 this[_state] = _PendingEvents._STATE_SCHEDULED; |
| 3563 return; | 3563 return; |
| 3564 } | 3564 } |
| 3565 scheduleMicrotask(dart.fn(() => { | 3565 scheduleMicrotask(dart.fn((() => { |
| 3566 let oldState = this[_state]; | 3566 let oldState = this[_state]; |
| 3567 this[_state] = _PendingEvents._STATE_UNSCHEDULED; | 3567 this[_state] = _PendingEvents._STATE_UNSCHEDULED; |
| 3568 if (oldState == _PendingEvents._STATE_CANCELED) | 3568 if (oldState == _PendingEvents._STATE_CANCELED) |
| 3569 return; | 3569 return; |
| 3570 this.handleNext(dispatch); | 3570 this.handleNext(dispatch); |
| 3571 })); | 3571 }).bind(this))); |
| 3572 this[_state] = _PendingEvents._STATE_SCHEDULED; | 3572 this[_state] = _PendingEvents._STATE_SCHEDULED; |
| 3573 } | 3573 } |
| 3574 cancelSchedule() { | 3574 cancelSchedule() { |
| 3575 if (dart.notNull(this.isScheduled)) | 3575 if (dart.notNull(this.isScheduled)) |
| 3576 this[_state] = _PendingEvents._STATE_CANCELED; | 3576 this[_state] = _PendingEvents._STATE_CANCELED; |
| 3577 } | 3577 } |
| 3578 } | 3578 } |
| 3579 dart.setSignature(_PendingEvents, { | 3579 dart.setSignature(_PendingEvents, { |
| 3580 methods: () => ({ | 3580 methods: () => ({ |
| 3581 schedule: [dart.void, [_EventDispatch]], | 3581 schedule: [dart.void, [_EventDispatch]], |
| (...skipping 1664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5246 return _rootRunBinary(null, null, this, f, arg1, arg2); | 5246 return _rootRunBinary(null, null, this, f, arg1, arg2); |
| 5247 } catch (e) { | 5247 } catch (e) { |
| 5248 let s = dart.stackTrace(e); | 5248 let s = dart.stackTrace(e); |
| 5249 return this.handleUncaughtError(e, s); | 5249 return this.handleUncaughtError(e, s); |
| 5250 } | 5250 } |
| 5251 | 5251 |
| 5252 } | 5252 } |
| 5253 bindCallback(f, opts) { | 5253 bindCallback(f, opts) { |
| 5254 let runGuarded = opts && 'runGuarded' in opts ? opts.runGuarded : true; | 5254 let runGuarded = opts && 'runGuarded' in opts ? opts.runGuarded : true; |
| 5255 if (dart.notNull(runGuarded)) { | 5255 if (dart.notNull(runGuarded)) { |
| 5256 return dart.fn(() => this.runGuarded(f)); | 5256 return dart.fn((() => this.runGuarded(f)).bind(this)); |
| 5257 } else { | 5257 } else { |
| 5258 return dart.fn(() => this.run(f)); | 5258 return dart.fn((() => this.run(f)).bind(this)); |
| 5259 } | 5259 } |
| 5260 } | 5260 } |
| 5261 bindUnaryCallback(f, opts) { | 5261 bindUnaryCallback(f, opts) { |
| 5262 let runGuarded = opts && 'runGuarded' in opts ? opts.runGuarded : true; | 5262 let runGuarded = opts && 'runGuarded' in opts ? opts.runGuarded : true; |
| 5263 if (dart.notNull(runGuarded)) { | 5263 if (dart.notNull(runGuarded)) { |
| 5264 return dart.fn(arg => this.runUnaryGuarded(f, arg)); | 5264 return dart.fn((arg => this.runUnaryGuarded(f, arg)).bind(this)); |
| 5265 } else { | 5265 } else { |
| 5266 return dart.fn(arg => this.runUnary(f, arg)); | 5266 return dart.fn((arg => this.runUnary(f, arg)).bind(this)); |
| 5267 } | 5267 } |
| 5268 } | 5268 } |
| 5269 bindBinaryCallback(f, opts) { | 5269 bindBinaryCallback(f, opts) { |
| 5270 let runGuarded = opts && 'runGuarded' in opts ? opts.runGuarded : true; | 5270 let runGuarded = opts && 'runGuarded' in opts ? opts.runGuarded : true; |
| 5271 if (dart.notNull(runGuarded)) { | 5271 if (dart.notNull(runGuarded)) { |
| 5272 return dart.fn((arg1, arg2) => this.runBinaryGuarded(f, arg1, arg2)); | 5272 return dart.fn(((arg1, arg2) => this.runBinaryGuarded(f, arg1, arg2)).bi
nd(this)); |
| 5273 } else { | 5273 } else { |
| 5274 return dart.fn((arg1, arg2) => this.runBinary(f, arg1, arg2)); | 5274 return dart.fn(((arg1, arg2) => this.runBinary(f, arg1, arg2)).bind(this
)); |
| 5275 } | 5275 } |
| 5276 } | 5276 } |
| 5277 get(key) { | 5277 get(key) { |
| 5278 return null; | 5278 return null; |
| 5279 } | 5279 } |
| 5280 handleUncaughtError(error, stackTrace) { | 5280 handleUncaughtError(error, stackTrace) { |
| 5281 return _rootHandleUncaughtError(null, null, this, error, stackTrace); | 5281 return _rootHandleUncaughtError(null, null, this, error, stackTrace); |
| 5282 } | 5282 } |
| 5283 fork(opts) { | 5283 fork(opts) { |
| 5284 let specification = opts && 'specification' in opts ? opts.specification :
null; | 5284 let specification = opts && 'specification' in opts ? opts.specification :
null; |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5518 } catch (e) { | 5518 } catch (e) { |
| 5519 let s = dart.stackTrace(e); | 5519 let s = dart.stackTrace(e); |
| 5520 return this.handleUncaughtError(e, s); | 5520 return this.handleUncaughtError(e, s); |
| 5521 } | 5521 } |
| 5522 | 5522 |
| 5523 } | 5523 } |
| 5524 bindCallback(f, opts) { | 5524 bindCallback(f, opts) { |
| 5525 let runGuarded = opts && 'runGuarded' in opts ? opts.runGuarded : true; | 5525 let runGuarded = opts && 'runGuarded' in opts ? opts.runGuarded : true; |
| 5526 let registered = this.registerCallback(f); | 5526 let registered = this.registerCallback(f); |
| 5527 if (dart.notNull(runGuarded)) { | 5527 if (dart.notNull(runGuarded)) { |
| 5528 return dart.fn(() => this.runGuarded(registered)); | 5528 return dart.fn((() => this.runGuarded(registered)).bind(this)); |
| 5529 } else { | 5529 } else { |
| 5530 return dart.fn(() => this.run(registered)); | 5530 return dart.fn((() => this.run(registered)).bind(this)); |
| 5531 } | 5531 } |
| 5532 } | 5532 } |
| 5533 bindUnaryCallback(f, opts) { | 5533 bindUnaryCallback(f, opts) { |
| 5534 let runGuarded = opts && 'runGuarded' in opts ? opts.runGuarded : true; | 5534 let runGuarded = opts && 'runGuarded' in opts ? opts.runGuarded : true; |
| 5535 let registered = this.registerUnaryCallback(f); | 5535 let registered = this.registerUnaryCallback(f); |
| 5536 if (dart.notNull(runGuarded)) { | 5536 if (dart.notNull(runGuarded)) { |
| 5537 return dart.fn(arg => this.runUnaryGuarded(registered, arg)); | 5537 return dart.fn((arg => this.runUnaryGuarded(registered, arg)).bind(this)
); |
| 5538 } else { | 5538 } else { |
| 5539 return dart.fn(arg => this.runUnary(registered, arg)); | 5539 return dart.fn((arg => this.runUnary(registered, arg)).bind(this)); |
| 5540 } | 5540 } |
| 5541 } | 5541 } |
| 5542 bindBinaryCallback(f, opts) { | 5542 bindBinaryCallback(f, opts) { |
| 5543 let runGuarded = opts && 'runGuarded' in opts ? opts.runGuarded : true; | 5543 let runGuarded = opts && 'runGuarded' in opts ? opts.runGuarded : true; |
| 5544 let registered = this.registerBinaryCallback(f); | 5544 let registered = this.registerBinaryCallback(f); |
| 5545 if (dart.notNull(runGuarded)) { | 5545 if (dart.notNull(runGuarded)) { |
| 5546 return dart.fn((arg1, arg2) => this.runBinaryGuarded(registered, arg1, a
rg2)); | 5546 return dart.fn(((arg1, arg2) => this.runBinaryGuarded(registered, arg1,
arg2)).bind(this)); |
| 5547 } else { | 5547 } else { |
| 5548 return dart.fn((arg1, arg2) => this.runBinary(registered, arg1, arg2)); | 5548 return dart.fn(((arg1, arg2) => this.runBinary(registered, arg1, arg2)).
bind(this)); |
| 5549 } | 5549 } |
| 5550 } | 5550 } |
| 5551 get(key) { | 5551 get(key) { |
| 5552 let result = this[_map].get(key); | 5552 let result = this[_map].get(key); |
| 5553 if (result != null || dart.notNull(this[_map].containsKey(key))) | 5553 if (result != null || dart.notNull(this[_map].containsKey(key))) |
| 5554 return result; | 5554 return result; |
| 5555 if (this.parent != null) { | 5555 if (this.parent != null) { |
| 5556 let value = this.parent.get(key); | 5556 let value = this.parent.get(key); |
| 5557 if (value != null) { | 5557 if (value != null) { |
| 5558 this[_map].set(key, value); | 5558 this[_map].set(key, value); |
| (...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5911 exports.ScheduleMicrotaskHandler = ScheduleMicrotaskHandler; | 5911 exports.ScheduleMicrotaskHandler = ScheduleMicrotaskHandler; |
| 5912 exports.CreateTimerHandler = CreateTimerHandler; | 5912 exports.CreateTimerHandler = CreateTimerHandler; |
| 5913 exports.CreatePeriodicTimerHandler = CreatePeriodicTimerHandler; | 5913 exports.CreatePeriodicTimerHandler = CreatePeriodicTimerHandler; |
| 5914 exports.PrintHandler = PrintHandler; | 5914 exports.PrintHandler = PrintHandler; |
| 5915 exports.ForkHandler = ForkHandler; | 5915 exports.ForkHandler = ForkHandler; |
| 5916 exports.ZoneSpecification = ZoneSpecification; | 5916 exports.ZoneSpecification = ZoneSpecification; |
| 5917 exports.ZoneDelegate = ZoneDelegate; | 5917 exports.ZoneDelegate = ZoneDelegate; |
| 5918 exports.Zone = Zone; | 5918 exports.Zone = Zone; |
| 5919 exports.runZoned = runZoned; | 5919 exports.runZoned = runZoned; |
| 5920 }); | 5920 }); |
| OLD | NEW |