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

Side by Side Diff: lib/runtime/dart/async.js

Issue 1042943003: fixes private named constructors (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « lib/runtime/dart/_native_typed_data.js ('k') | lib/runtime/dart/collection.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 var async; 1 var async;
2 (function(exports) { 2 (function(exports) {
3 'use strict'; 3 'use strict';
4 // Function _invokeErrorHandler: (Function, Object, StackTrace) → dynamic 4 // Function _invokeErrorHandler: (Function, Object, StackTrace) → dynamic
5 function _invokeErrorHandler(errorHandler, error, stackTrace) { 5 function _invokeErrorHandler(errorHandler, error, stackTrace) {
6 if (dart.is(errorHandler, ZoneBinaryCallback)) { 6 if (dart.is(errorHandler, ZoneBinaryCallback)) {
7 return dart.dinvokef(errorHandler, error, stackTrace); 7 return dart.dinvokef(errorHandler, error, stackTrace);
8 } else { 8 } else {
9 return dart.dinvokef(errorHandler, error); 9 return dart.dinvokef(errorHandler, error);
10 } 10 }
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 let _createSubscription = Symbol('_createSubscription'); 51 let _createSubscription = Symbol('_createSubscription');
52 let _onListen = Symbol('_onListen'); 52 let _onListen = Symbol('_onListen');
53 let _addError = Symbol('_addError'); 53 let _addError = Symbol('_addError');
54 let _completeError = Symbol('_completeError'); 54 let _completeError = Symbol('_completeError');
55 let _complete = Symbol('_complete'); 55 let _complete = Symbol('_complete');
56 let _sink = Symbol('_sink'); 56 let _sink = Symbol('_sink');
57 let Stream$ = dart.generic(function(T) { 57 let Stream$ = dart.generic(function(T) {
58 class Stream extends core.Object { 58 class Stream extends core.Object {
59 Stream() { 59 Stream() {
60 } 60 }
61 Stream$fromFuture(future) { 61 fromFuture(future) {
62 let controller = dart.as(new StreamController({sync: true}), _StreamCont roller$(T)); 62 let controller = dart.as(new StreamController({sync: true}), _StreamCont roller$(T));
63 future.then(dart.closureWrap(((value) => { 63 future.then(dart.closureWrap(((value) => {
64 controller._add(dart.as(value, T)); 64 controller._add(dart.as(value, T));
65 controller._closeUnchecked(); 65 controller._closeUnchecked();
66 }).bind(this), "(T) → dynamic"), {onError: ((error, stackTrace) => { 66 }).bind(this), "(T) → dynamic"), {onError: ((error, stackTrace) => {
67 controller._addError(error, dart.as(stackTrace, core.StackTrace)); 67 controller._addError(error, dart.as(stackTrace, core.StackTrace));
68 controller._closeUnchecked(); 68 controller._closeUnchecked();
69 }).bind(this)}); 69 }).bind(this)});
70 return controller.stream; 70 return controller.stream;
71 } 71 }
72 Stream$fromIterable(data) { 72 fromIterable(data) {
73 return new _GeneratedStreamImpl(() => new _IterablePendingEvents(data)); 73 return new _GeneratedStreamImpl(() => new _IterablePendingEvents(data));
74 } 74 }
75 Stream$periodic(period, computation) { 75 periodic(period, computation) {
76 if (computation === void 0) 76 if (computation === void 0)
77 computation = null; 77 computation = null;
78 if (computation === null) 78 if (computation === null)
79 computation = dart.closureWrap((i) => null, "(int) → T"); 79 computation = dart.closureWrap((i) => null, "(int) → T");
80 let timer = null; 80 let timer = null;
81 let computationCount = 0; 81 let computationCount = 0;
82 let controller = null; 82 let controller = null;
83 let watch = new core.Stopwatch(); 83 let watch = new core.Stopwatch();
84 // Function sendEvent: () → void 84 // Function sendEvent: () → void
85 function sendEvent() { 85 function sendEvent() {
(...skipping 24 matching lines...) Expand all
110 startPeriodicTimer(); 110 startPeriodicTimer();
111 sendEvent(); 111 sendEvent();
112 }); 112 });
113 }).bind(this), onCancel: (() => { 113 }).bind(this), onCancel: (() => {
114 if (timer !== null) 114 if (timer !== null)
115 timer.cancel(); 115 timer.cancel();
116 timer = null; 116 timer = null;
117 }).bind(this)}); 117 }).bind(this)});
118 return controller.stream; 118 return controller.stream;
119 } 119 }
120 Stream$eventTransformed(source, mapSink) { 120 eventTransformed(source, mapSink) {
121 return dart.as(new _BoundSinkStream(source, dart.closureWrap(mapSink, "( EventSink<dynamic>) → EventSink")), Stream$(T)); 121 return dart.as(new _BoundSinkStream(source, dart.closureWrap(mapSink, "( EventSink<dynamic>) → EventSink")), Stream$(T));
122 } 122 }
123 get isBroadcast() { 123 get isBroadcast() {
124 return false; 124 return false;
125 } 125 }
126 asBroadcastStream(opts) { 126 asBroadcastStream(opts) {
127 let onListen = opts && 'onListen' in opts ? opts.onListen : null; 127 let onListen = opts && 'onListen' in opts ? opts.onListen : null;
128 let onCancel = opts && 'onCancel' in opts ? opts.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 }
(...skipping 1438 matching lines...) Expand 10 before | Expand all | Expand 10 after
1569 try { 1569 try {
1570 result._complete(computation()); 1570 result._complete(computation());
1571 } catch (e) { 1571 } catch (e) {
1572 let s = dart.stackTrace(e); 1572 let s = dart.stackTrace(e);
1573 _completeWithErrorCallback(result, e, s); 1573 _completeWithErrorCallback(result, e, s);
1574 } 1574 }
1575 1575
1576 }).bind(this)); 1576 }).bind(this));
1577 return dart.as(result, Future$(T)); 1577 return dart.as(result, Future$(T));
1578 } 1578 }
1579 Future$microtask(computation) { 1579 microtask(computation) {
1580 let result = new _Future(); 1580 let result = new _Future();
1581 scheduleMicrotask((() => { 1581 scheduleMicrotask((() => {
1582 try { 1582 try {
1583 result._complete(computation()); 1583 result._complete(computation());
1584 } catch (e) { 1584 } catch (e) {
1585 let s = dart.stackTrace(e); 1585 let s = dart.stackTrace(e);
1586 _completeWithErrorCallback(result, e, s); 1586 _completeWithErrorCallback(result, e, s);
1587 } 1587 }
1588 1588
1589 }).bind(this)); 1589 }).bind(this));
1590 return dart.as(result, Future$(T)); 1590 return dart.as(result, Future$(T));
1591 } 1591 }
1592 Future$sync(computation) { 1592 sync(computation) {
1593 try { 1593 try {
1594 let result = computation(); 1594 let result = computation();
1595 return new Future.value(result); 1595 return new Future.value(result);
1596 } catch (error) { 1596 } catch (error) {
1597 let stackTrace = dart.stackTrace(error); 1597 let stackTrace = dart.stackTrace(error);
1598 return new Future.error(error, stackTrace); 1598 return new Future.error(error, stackTrace);
1599 } 1599 }
1600 1600
1601 } 1601 }
1602 Future$value(value) { 1602 value(value) {
1603 if (value === void 0) 1603 if (value === void 0)
1604 value = null; 1604 value = null;
1605 return new _Future.immediate(value); 1605 return new _Future.immediate(value);
1606 } 1606 }
1607 Future$error(error, stackTrace) { 1607 error(error, stackTrace) {
1608 if (stackTrace === void 0) 1608 if (stackTrace === void 0)
1609 stackTrace = null; 1609 stackTrace = null;
1610 error = _nonNullError(error); 1610 error = _nonNullError(error);
1611 if (!dart.notNull(core.identical(Zone.current, _ROOT_ZONE))) { 1611 if (!dart.notNull(core.identical(Zone.current, _ROOT_ZONE))) {
1612 let replacement = Zone.current.errorCallback(error, stackTrace); 1612 let replacement = Zone.current.errorCallback(error, stackTrace);
1613 if (replacement !== null) { 1613 if (replacement !== null) {
1614 error = _nonNullError(replacement.error); 1614 error = _nonNullError(replacement.error);
1615 stackTrace = replacement.stackTrace; 1615 stackTrace = replacement.stackTrace;
1616 } 1616 }
1617 } 1617 }
1618 return new _Future.immediateError(error, stackTrace); 1618 return new _Future.immediateError(error, stackTrace);
1619 } 1619 }
1620 Future$delayed(duration, computation) { 1620 delayed(duration, computation) {
1621 if (computation === void 0) 1621 if (computation === void 0)
1622 computation = null; 1622 computation = null;
1623 let result = new _Future(); 1623 let result = new _Future();
1624 new Timer(duration, (() => { 1624 new Timer(duration, (() => {
1625 try { 1625 try {
1626 result._complete(computation === null ? null : computation()); 1626 result._complete(computation === null ? null : computation());
1627 } catch (e) { 1627 } catch (e) {
1628 let s = dart.stackTrace(e); 1628 let s = dart.stackTrace(e);
1629 _completeWithErrorCallback(result, e, s); 1629 _completeWithErrorCallback(result, e, s);
1630 } 1630 }
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
1740 if (this.message !== null) 1740 if (this.message !== null)
1741 result = `${result}: ${this.message}`; 1741 result = `${result}: ${this.message}`;
1742 return result; 1742 return result;
1743 } 1743 }
1744 } 1744 }
1745 let Completer$ = dart.generic(function(T) { 1745 let Completer$ = dart.generic(function(T) {
1746 class Completer extends core.Object { 1746 class Completer extends core.Object {
1747 Completer() { 1747 Completer() {
1748 return new _AsyncCompleter(); 1748 return new _AsyncCompleter();
1749 } 1749 }
1750 Completer$sync() { 1750 sync() {
1751 return new _SyncCompleter(); 1751 return new _SyncCompleter();
1752 } 1752 }
1753 } 1753 }
1754 dart.defineNamedConstructor(Completer, 'sync'); 1754 dart.defineNamedConstructor(Completer, 'sync');
1755 return Completer; 1755 return Completer;
1756 }); 1756 });
1757 let Completer = Completer$(dart.dynamic); 1757 let Completer = Completer$(dart.dynamic);
1758 // Function _completeWithErrorCallback: (_Future<dynamic>, dynamic, dynamic) → void 1758 // Function _completeWithErrorCallback: (_Future<dynamic>, dynamic, dynamic) → void
1759 function _completeWithErrorCallback(result, error, stackTrace) { 1759 function _completeWithErrorCallback(result, error, stackTrace) {
1760 let replacement = Zone.current.errorCallback(error, dart.as(stackTrace, core .StackTrace)); 1760 let replacement = Zone.current.errorCallback(error, dart.as(stackTrace, core .StackTrace));
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
1823 } 1823 }
1824 } 1824 }
1825 return _SyncCompleter; 1825 return _SyncCompleter;
1826 }); 1826 });
1827 let _SyncCompleter = _SyncCompleter$(dart.dynamic); 1827 let _SyncCompleter = _SyncCompleter$(dart.dynamic);
1828 let _nextListener = Symbol('_nextListener'); 1828 let _nextListener = Symbol('_nextListener');
1829 let _onValue = Symbol('_onValue'); 1829 let _onValue = Symbol('_onValue');
1830 let _errorTest = Symbol('_errorTest'); 1830 let _errorTest = Symbol('_errorTest');
1831 let _whenCompleteAction = Symbol('_whenCompleteAction'); 1831 let _whenCompleteAction = Symbol('_whenCompleteAction');
1832 class _FutureListener extends core.Object { 1832 class _FutureListener extends core.Object {
1833 _FutureListener$then(result, onValue, errorCallback) { 1833 then(result, onValue, errorCallback) {
1834 this.result = result; 1834 this.result = result;
1835 this.callback = onValue; 1835 this.callback = onValue;
1836 this.errorCallback = errorCallback; 1836 this.errorCallback = errorCallback;
1837 this.state = errorCallback === null ? _FutureListener.STATE_THEN : _Future Listener.STATE_THEN_ONERROR; 1837 this.state = errorCallback === null ? _FutureListener.STATE_THEN : _Future Listener.STATE_THEN_ONERROR;
1838 this[_nextListener] = null; 1838 this[_nextListener] = null;
1839 } 1839 }
1840 _FutureListener$catchError(result, errorCallback, test) { 1840 catchError(result, errorCallback, test) {
1841 this.result = result; 1841 this.result = result;
1842 this.errorCallback = errorCallback; 1842 this.errorCallback = errorCallback;
1843 this.callback = test; 1843 this.callback = test;
1844 this.state = test === null ? _FutureListener.STATE_CATCHERROR : _FutureLis tener.STATE_CATCHERROR_TEST; 1844 this.state = test === null ? _FutureListener.STATE_CATCHERROR : _FutureLis tener.STATE_CATCHERROR_TEST;
1845 this[_nextListener] = null; 1845 this[_nextListener] = null;
1846 } 1846 }
1847 _FutureListener$whenComplete(result, onComplete) { 1847 whenComplete(result, onComplete) {
1848 this.result = result; 1848 this.result = result;
1849 this.callback = onComplete; 1849 this.callback = onComplete;
1850 this.errorCallback = null; 1850 this.errorCallback = null;
1851 this.state = _FutureListener.STATE_WHENCOMPLETE; 1851 this.state = _FutureListener.STATE_WHENCOMPLETE;
1852 this[_nextListener] = null; 1852 this[_nextListener] = null;
1853 } 1853 }
1854 _FutureListener$chain(result) { 1854 chain(result) {
1855 this.result = result; 1855 this.result = result;
1856 this.callback = null; 1856 this.callback = null;
1857 this.errorCallback = null; 1857 this.errorCallback = null;
1858 this.state = _FutureListener.STATE_CHAIN; 1858 this.state = _FutureListener.STATE_CHAIN;
1859 this[_nextListener] = null; 1859 this[_nextListener] = null;
1860 } 1860 }
1861 get [_zone]() { 1861 get [_zone]() {
1862 return this.result[_zone]; 1862 return this.result[_zone];
1863 } 1863 }
1864 get handlesValue() { 1864 get handlesValue() {
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
1926 let _chainForeignFuture = Symbol('_chainForeignFuture'); 1926 let _chainForeignFuture = Symbol('_chainForeignFuture');
1927 let _chainCoreFuture = Symbol('_chainCoreFuture'); 1927 let _chainCoreFuture = Symbol('_chainCoreFuture');
1928 let _completeWithValue = Symbol('_completeWithValue'); 1928 let _completeWithValue = Symbol('_completeWithValue');
1929 let _Future$ = dart.generic(function(T) { 1929 let _Future$ = dart.generic(function(T) {
1930 class _Future extends core.Object { 1930 class _Future extends core.Object {
1931 _Future() { 1931 _Future() {
1932 this[_zone] = Zone.current; 1932 this[_zone] = Zone.current;
1933 this[_state] = _Future[_INCOMPLETE]; 1933 this[_state] = _Future[_INCOMPLETE];
1934 this[_resultOrListeners] = null; 1934 this[_resultOrListeners] = null;
1935 } 1935 }
1936 _Future$immediate(value) { 1936 immediate(value) {
1937 this[_zone] = Zone.current; 1937 this[_zone] = Zone.current;
1938 this[_state] = _Future[_INCOMPLETE]; 1938 this[_state] = _Future[_INCOMPLETE];
1939 this[_resultOrListeners] = null; 1939 this[_resultOrListeners] = null;
1940 this[_asyncComplete](value); 1940 this[_asyncComplete](value);
1941 } 1941 }
1942 _Future$immediateError(error, stackTrace) { 1942 immediateError(error, stackTrace) {
1943 if (stackTrace === void 0) 1943 if (stackTrace === void 0)
1944 stackTrace = null; 1944 stackTrace = null;
1945 this[_zone] = Zone.current; 1945 this[_zone] = Zone.current;
1946 this[_state] = _Future[_INCOMPLETE]; 1946 this[_state] = _Future[_INCOMPLETE];
1947 this[_resultOrListeners] = null; 1947 this[_resultOrListeners] = null;
1948 this[_asyncCompleteError](error, stackTrace); 1948 this[_asyncCompleteError](error, stackTrace);
1949 } 1949 }
1950 get [_mayComplete]() { 1950 get [_mayComplete]() {
1951 return this[_state] === _Future[_INCOMPLETE]; 1951 return this[_state] === _Future[_INCOMPLETE];
1952 } 1952 }
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after
2537 class StreamSink extends core.Object { 2537 class StreamSink extends core.Object {
2538 } 2538 }
2539 return StreamSink; 2539 return StreamSink;
2540 }); 2540 });
2541 let StreamSink = StreamSink$(dart.dynamic); 2541 let StreamSink = StreamSink$(dart.dynamic);
2542 let StreamTransformer$ = dart.generic(function(S, T) { 2542 let StreamTransformer$ = dart.generic(function(S, T) {
2543 class StreamTransformer extends core.Object { 2543 class StreamTransformer extends core.Object {
2544 StreamTransformer(transformer) { 2544 StreamTransformer(transformer) {
2545 return new _StreamSubscriptionTransformer(transformer); 2545 return new _StreamSubscriptionTransformer(transformer);
2546 } 2546 }
2547 StreamTransformer$fromHandlers(opts) { 2547 fromHandlers(opts) {
2548 return new _StreamHandlerTransformer(opts); 2548 return new _StreamHandlerTransformer(opts);
2549 } 2549 }
2550 } 2550 }
2551 dart.defineNamedConstructor(StreamTransformer, 'fromHandlers'); 2551 dart.defineNamedConstructor(StreamTransformer, 'fromHandlers');
2552 return StreamTransformer; 2552 return StreamTransformer;
2553 }); 2553 });
2554 let StreamTransformer = StreamTransformer$(dart.dynamic, dart.dynamic); 2554 let StreamTransformer = StreamTransformer$(dart.dynamic, dart.dynamic);
2555 let StreamIterator$ = dart.generic(function(T) { 2555 let StreamIterator$ = dart.generic(function(T) {
2556 class StreamIterator extends core.Object { 2556 class StreamIterator extends core.Object {
2557 StreamIterator(stream) { 2557 StreamIterator(stream) {
(...skipping 29 matching lines...) Expand all
2587 let onListen = opts && 'onListen' in opts ? opts.onListen : null; 2587 let onListen = opts && 'onListen' in opts ? opts.onListen : null;
2588 let onPause = opts && 'onPause' in opts ? opts.onPause : null; 2588 let onPause = opts && 'onPause' in opts ? opts.onPause : null;
2589 let onResume = opts && 'onResume' in opts ? opts.onResume : null; 2589 let onResume = opts && 'onResume' in opts ? opts.onResume : null;
2590 let onCancel = opts && 'onCancel' in opts ? opts.onCancel : null; 2590 let onCancel = opts && 'onCancel' in opts ? opts.onCancel : null;
2591 let sync = opts && 'sync' in opts ? opts.sync : false; 2591 let sync = opts && 'sync' in opts ? opts.sync : false;
2592 if (dart.notNull(onListen === null) && dart.notNull(onPause === null) && dart.notNull(onResume === null) && dart.notNull(onCancel === null)) { 2592 if (dart.notNull(onListen === null) && dart.notNull(onPause === null) && dart.notNull(onResume === null) && dart.notNull(onCancel === null)) {
2593 return dart.as(sync ? new _NoCallbackSyncStreamController() : new _NoC allbackAsyncStreamController(), StreamController$(T)); 2593 return dart.as(sync ? new _NoCallbackSyncStreamController() : new _NoC allbackAsyncStreamController(), StreamController$(T));
2594 } 2594 }
2595 return sync ? new _SyncStreamController(onListen, onPause, onResume, onC ancel) : new _AsyncStreamController(onListen, onPause, onResume, onCancel); 2595 return sync ? new _SyncStreamController(onListen, onPause, onResume, onC ancel) : new _AsyncStreamController(onListen, onPause, onResume, onCancel);
2596 } 2596 }
2597 StreamController$broadcast(opts) { 2597 broadcast(opts) {
2598 let onListen = opts && 'onListen' in opts ? opts.onListen : null; 2598 let onListen = opts && 'onListen' in opts ? opts.onListen : null;
2599 let onCancel = opts && 'onCancel' in opts ? opts.onCancel : null; 2599 let onCancel = opts && 'onCancel' in opts ? opts.onCancel : null;
2600 let sync = opts && 'sync' in opts ? opts.sync : false; 2600 let sync = opts && 'sync' in opts ? opts.sync : false;
2601 return sync ? new _SyncBroadcastStreamController(onListen, onCancel) : n ew _AsyncBroadcastStreamController(onListen, onCancel); 2601 return sync ? new _SyncBroadcastStreamController(onListen, onCancel) : n ew _AsyncBroadcastStreamController(onListen, onCancel);
2602 } 2602 }
2603 } 2603 }
2604 dart.defineNamedConstructor(StreamController, 'broadcast'); 2604 dart.defineNamedConstructor(StreamController, 'broadcast');
2605 return StreamController; 2605 return StreamController;
2606 }); 2606 });
2607 let StreamController = StreamController$(dart.dynamic); 2607 let StreamController = StreamController$(dart.dynamic);
(...skipping 1574 matching lines...) Expand 10 before | Expand all | Expand 10 after
4182 let _BoundSubscriptionStream = _BoundSubscriptionStream$(dart.dynamic, dart.dy namic); 4182 let _BoundSubscriptionStream = _BoundSubscriptionStream$(dart.dynamic, dart.dy namic);
4183 let _createTimer = Symbol('_createTimer'); 4183 let _createTimer = Symbol('_createTimer');
4184 let _createPeriodicTimer = Symbol('_createPeriodicTimer'); 4184 let _createPeriodicTimer = Symbol('_createPeriodicTimer');
4185 class Timer extends core.Object { 4185 class Timer extends core.Object {
4186 Timer(duration, callback) { 4186 Timer(duration, callback) {
4187 if (dart.equals(Zone.current, Zone.ROOT)) { 4187 if (dart.equals(Zone.current, Zone.ROOT)) {
4188 return Zone.current.createTimer(duration, callback); 4188 return Zone.current.createTimer(duration, callback);
4189 } 4189 }
4190 return Zone.current.createTimer(duration, Zone.current.bindCallback(callba ck, {runGuarded: true})); 4190 return Zone.current.createTimer(duration, Zone.current.bindCallback(callba ck, {runGuarded: true}));
4191 } 4191 }
4192 Timer$periodic(duration, callback) { 4192 periodic(duration, callback) {
4193 if (dart.equals(Zone.current, Zone.ROOT)) { 4193 if (dart.equals(Zone.current, Zone.ROOT)) {
4194 return Zone.current.createPeriodicTimer(duration, callback); 4194 return Zone.current.createPeriodicTimer(duration, callback);
4195 } 4195 }
4196 return Zone.current.createPeriodicTimer(duration, dart.closureWrap(Zone.cu rrent.bindUnaryCallback(callback, {runGuarded: true}), "(Timer) → void")); 4196 return Zone.current.createPeriodicTimer(duration, dart.closureWrap(Zone.cu rrent.bindUnaryCallback(callback, {runGuarded: true}), "(Timer) → void"));
4197 } 4197 }
4198 static run(callback) { 4198 static run(callback) {
4199 new Timer(core.Duration.ZERO, callback); 4199 new Timer(core.Duration.ZERO, callback);
4200 } 4200 }
4201 static [_createTimer](duration, callback) { 4201 static [_createTimer](duration, callback) {
4202 let milliseconds = duration.inMilliseconds; 4202 let milliseconds = duration.inMilliseconds;
(...skipping 12 matching lines...) Expand all
4215 class _ZoneFunction extends core.Object { 4215 class _ZoneFunction extends core.Object {
4216 _ZoneFunction(zone, func) { 4216 _ZoneFunction(zone, func) {
4217 this.zone = zone; 4217 this.zone = zone;
4218 this.function = func; 4218 this.function = func;
4219 } 4219 }
4220 } 4220 }
4221 class ZoneSpecification extends core.Object { 4221 class ZoneSpecification extends core.Object {
4222 ZoneSpecification(opts) { 4222 ZoneSpecification(opts) {
4223 return new _ZoneSpecification(opts); 4223 return new _ZoneSpecification(opts);
4224 } 4224 }
4225 ZoneSpecification$from(other, opts) { 4225 from(other, opts) {
4226 let handleUncaughtError = opts && 'handleUncaughtError' in opts ? opts.han dleUncaughtError : null; 4226 let handleUncaughtError = opts && 'handleUncaughtError' in opts ? opts.han dleUncaughtError : null;
4227 let run = opts && 'run' in opts ? opts.run : null; 4227 let run = opts && 'run' in opts ? opts.run : null;
4228 let runUnary = opts && 'runUnary' in opts ? opts.runUnary : null; 4228 let runUnary = opts && 'runUnary' in opts ? opts.runUnary : null;
4229 let runBinary = opts && 'runBinary' in opts ? opts.runBinary : null; 4229 let runBinary = opts && 'runBinary' in opts ? opts.runBinary : null;
4230 let registerCallback = opts && 'registerCallback' in opts ? opts.registerC allback : null; 4230 let registerCallback = opts && 'registerCallback' in opts ? opts.registerC allback : null;
4231 let registerUnaryCallback = opts && 'registerUnaryCallback' in opts ? opts .registerUnaryCallback : null; 4231 let registerUnaryCallback = opts && 'registerUnaryCallback' in opts ? opts .registerUnaryCallback : null;
4232 let registerBinaryCallback = opts && 'registerBinaryCallback' in opts ? op ts.registerBinaryCallback : null; 4232 let registerBinaryCallback = opts && 'registerBinaryCallback' in opts ? op ts.registerBinaryCallback : null;
4233 let errorCallback = opts && 'errorCallback' in opts ? opts.errorCallback : null; 4233 let errorCallback = opts && 'errorCallback' in opts ? opts.errorCallback : null;
4234 let scheduleMicrotask = opts && 'scheduleMicrotask' in opts ? opts.schedul eMicrotask : null; 4234 let scheduleMicrotask = opts && 'scheduleMicrotask' in opts ? opts.schedul eMicrotask : null;
4235 let createTimer = opts && 'createTimer' in opts ? opts.createTimer : null; 4235 let createTimer = opts && 'createTimer' in opts ? opts.createTimer : null;
(...skipping 29 matching lines...) Expand all
4265 this.errorCallback = errorCallback; 4265 this.errorCallback = errorCallback;
4266 this.scheduleMicrotask = scheduleMicrotask; 4266 this.scheduleMicrotask = scheduleMicrotask;
4267 this.createTimer = createTimer; 4267 this.createTimer = createTimer;
4268 this.createPeriodicTimer = createPeriodicTimer; 4268 this.createPeriodicTimer = createPeriodicTimer;
4269 this.print = print; 4269 this.print = print;
4270 this.fork = fork; 4270 this.fork = fork;
4271 } 4271 }
4272 } 4272 }
4273 class ZoneDelegate extends core.Object { 4273 class ZoneDelegate extends core.Object {
4274 } 4274 }
4275 let _$ = Symbol('_');
4275 let _enter = Symbol('_enter'); 4276 let _enter = Symbol('_enter');
4276 let _leave = Symbol('_leave'); 4277 let _leave = Symbol('_leave');
4277 let _$ = Symbol('_');
4278 class Zone extends core.Object { 4278 class Zone extends core.Object {
4279 Zone$_() { 4279 [_$]() {
4280 } 4280 }
4281 static get current() { 4281 static get current() {
4282 return Zone[_current]; 4282 return Zone[_current];
4283 } 4283 }
4284 static [_enter](zone) { 4284 static [_enter](zone) {
4285 dart.assert(zone !== null); 4285 dart.assert(zone !== null);
4286 dart.assert(!dart.notNull(core.identical(zone, Zone[_current]))); 4286 dart.assert(!dart.notNull(core.identical(zone, Zone[_current])));
4287 let previous = Zone[_current]; 4287 let previous = Zone[_current];
4288 Zone[_current] = zone; 4288 Zone[_current] = zone;
4289 return previous; 4289 return previous;
(...skipping 692 matching lines...) Expand 10 before | Expand all | Expand 10 after
4982 exports.StreamIterator = StreamIterator; 4982 exports.StreamIterator = StreamIterator;
4983 exports.StreamIterator$ = StreamIterator$; 4983 exports.StreamIterator$ = StreamIterator$;
4984 exports.StreamController = StreamController; 4984 exports.StreamController = StreamController;
4985 exports.StreamController$ = StreamController$; 4985 exports.StreamController$ = StreamController$;
4986 exports.Timer = Timer; 4986 exports.Timer = Timer;
4987 exports.ZoneSpecification = ZoneSpecification; 4987 exports.ZoneSpecification = ZoneSpecification;
4988 exports.ZoneDelegate = ZoneDelegate; 4988 exports.ZoneDelegate = ZoneDelegate;
4989 exports.Zone = Zone; 4989 exports.Zone = Zone;
4990 exports.runZoned = runZoned; 4990 exports.runZoned = runZoned;
4991 })(async || (async = {})); 4991 })(async || (async = {}));
OLDNEW
« no previous file with comments | « lib/runtime/dart/_native_typed_data.js ('k') | lib/runtime/dart/collection.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698