| OLD | NEW |
| 1 var _isolate_helper = dart.defineLibrary(_isolate_helper, {}); | 1 var _isolate_helper = dart.defineLibrary(_isolate_helper, {}); |
| 2 var core = dart.import(core); | 2 var core = dart.import(core); |
| 3 var _native_typed_data = dart.import(_native_typed_data); | 3 var _native_typed_data = dart.import(_native_typed_data); |
| 4 var _interceptors = dart.lazyImport(_interceptors); | 4 var _interceptors = dart.lazyImport(_interceptors); |
| 5 var _js_helper = dart.lazyImport(_js_helper); | 5 var _js_helper = dart.lazyImport(_js_helper); |
| 6 var isolate = dart.import(isolate); | 6 var isolate = dart.import(isolate); |
| 7 var _foreign_helper = dart.import(_foreign_helper); | 7 var _foreign_helper = dart.import(_foreign_helper); |
| 8 var _js_embedded_names = dart.import(_js_embedded_names); | 8 var _js_embedded_names = dart.import(_js_embedded_names); |
| 9 var collection = dart.import(collection); | 9 var collection = dart.import(collection); |
| 10 var async = dart.import(async); | 10 var async = dart.import(async); |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 } | 158 } |
| 159 serializeDartObject(x) { | 159 serializeDartObject(x) { |
| 160 let classExtractor = _foreign_helper.JS_EMBEDDED_GLOBAL('', _js_embedded_n
ames.CLASS_ID_EXTRACTOR); | 160 let classExtractor = _foreign_helper.JS_EMBEDDED_GLOBAL('', _js_embedded_n
ames.CLASS_ID_EXTRACTOR); |
| 161 let fieldsExtractor = _foreign_helper.JS_EMBEDDED_GLOBAL('', _js_embedded_
names.CLASS_FIELDS_EXTRACTOR); | 161 let fieldsExtractor = _foreign_helper.JS_EMBEDDED_GLOBAL('', _js_embedded_
names.CLASS_FIELDS_EXTRACTOR); |
| 162 let classId = classExtractor(x); | 162 let classId = classExtractor(x); |
| 163 let fields = dart.as(fieldsExtractor(x), core.List); | 163 let fields = dart.as(fieldsExtractor(x), core.List); |
| 164 return ['dart', classId, this.serializeArrayInPlace(dart.as(fields, _inter
ceptors.JSArray))]; | 164 return ['dart', classId, this.serializeArrayInPlace(dart.as(fields, _inter
ceptors.JSArray))]; |
| 165 } | 165 } |
| 166 } | 166 } |
| 167 dart.setSignature(_Serializer, { | 167 dart.setSignature(_Serializer, { |
| 168 constructors: () => ({_Serializer: [_Serializer, [], {erializeSendPort: core
.Object}]}), |
| 168 methods: () => ({ | 169 methods: () => ({ |
| 169 serialize: [core.Object, [core.Object]], | 170 serialize: [core.Object, [core.Object]], |
| 170 unsupported: [dart.void, [core.Object], [core.String]], | 171 unsupported: [dart.void, [core.Object], [core.String]], |
| 171 makeRef: [core.Object, [core.int]], | 172 makeRef: [core.Object, [core.int]], |
| 172 isPrimitive: [core.bool, [core.Object]], | 173 isPrimitive: [core.bool, [core.Object]], |
| 173 serializePrimitive: [core.Object, [core.Object]], | 174 serializePrimitive: [core.Object, [core.Object]], |
| 174 serializeByteBuffer: [core.Object, [_native_typed_data.NativeByteBuffer]], | 175 serializeByteBuffer: [core.Object, [_native_typed_data.NativeByteBuffer]], |
| 175 serializeTypedData: [core.Object, [_native_typed_data.NativeTypedData]], | 176 serializeTypedData: [core.Object, [_native_typed_data.NativeTypedData]], |
| 176 serializeJSIndexable: [core.Object, [_interceptors.JSIndexable]], | 177 serializeJSIndexable: [core.Object, [_interceptors.JSIndexable]], |
| 177 serializeArray: [core.Object, [_interceptors.JSArray]], | 178 serializeArray: [core.Object, [_interceptors.JSArray]], |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 let fields = dart.as(dart.dindex(x, 2), core.List); | 372 let fields = dart.as(dart.dindex(x, 2), core.List); |
| 372 let instanceFromClassId = _foreign_helper.JS_EMBEDDED_GLOBAL('', _js_embed
ded_names.INSTANCE_FROM_CLASS_ID); | 373 let instanceFromClassId = _foreign_helper.JS_EMBEDDED_GLOBAL('', _js_embed
ded_names.INSTANCE_FROM_CLASS_ID); |
| 373 let initializeObject = _foreign_helper.JS_EMBEDDED_GLOBAL('', _js_embedded
_names.INITIALIZE_EMPTY_INSTANCE); | 374 let initializeObject = _foreign_helper.JS_EMBEDDED_GLOBAL('', _js_embedded
_names.INITIALIZE_EMPTY_INSTANCE); |
| 374 let emptyInstance = instanceFromClassId(classId); | 375 let emptyInstance = instanceFromClassId(classId); |
| 375 this.deserializedObjects[core.$add](emptyInstance); | 376 this.deserializedObjects[core.$add](emptyInstance); |
| 376 this.deserializeArrayInPlace(dart.as(fields, _interceptors.JSArray)); | 377 this.deserializeArrayInPlace(dart.as(fields, _interceptors.JSArray)); |
| 377 return initializeObject(classId, emptyInstance, fields); | 378 return initializeObject(classId, emptyInstance, fields); |
| 378 } | 379 } |
| 379 } | 380 } |
| 380 dart.setSignature(_Deserializer, { | 381 dart.setSignature(_Deserializer, { |
| 382 constructors: () => ({_Deserializer: [_Deserializer, [], {djustSendPort: cor
e.Object}]}), |
| 381 methods: () => ({ | 383 methods: () => ({ |
| 382 deserialize: [core.Object, [core.Object]], | 384 deserialize: [core.Object, [core.Object]], |
| 383 isPrimitive: [core.bool, [core.Object]], | 385 isPrimitive: [core.bool, [core.Object]], |
| 384 deserializePrimitive: [core.Object, [core.Object]], | 386 deserializePrimitive: [core.Object, [core.Object]], |
| 385 deserializeRef: [core.Object, [core.Object]], | 387 deserializeRef: [core.Object, [core.Object]], |
| 386 deserializeByteBuffer: [_native_typed_data.NativeByteBuffer, [core.Object]
], | 388 deserializeByteBuffer: [_native_typed_data.NativeByteBuffer, [core.Object]
], |
| 387 deserializeTypedData: [_native_typed_data.NativeTypedData, [core.Object]], | 389 deserializeTypedData: [_native_typed_data.NativeTypedData, [core.Object]], |
| 388 deserializeArrayInPlace: [core.List, [_interceptors.JSArray]], | 390 deserializeArrayInPlace: [core.List, [_interceptors.JSArray]], |
| 389 deserializeFixed: [core.List, [core.Object]], | 391 deserializeFixed: [core.List, [core.Object]], |
| 390 deserializeExtendable: [core.List, [core.Object]], | 392 deserializeExtendable: [core.List, [core.Object]], |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 516 static _serializePrintMessage(object) { | 518 static _serializePrintMessage(object) { |
| 517 return _serializeMessage(dart.map({command: "print", msg: object})); | 519 return _serializeMessage(dart.map({command: "print", msg: object})); |
| 518 } | 520 } |
| 519 maybeCloseWorker() { | 521 maybeCloseWorker() { |
| 520 if (dart.notNull(this.isWorker) && dart.notNull(this.isolates.isEmpty) &&
this.topEventLoop[_activeJsAsyncCount] == 0) { | 522 if (dart.notNull(this.isWorker) && dart.notNull(this.isolates.isEmpty) &&
this.topEventLoop[_activeJsAsyncCount] == 0) { |
| 521 this.mainManager.postMessage(_serializeMessage(dart.map({command: 'close
'}))); | 523 this.mainManager.postMessage(_serializeMessage(dart.map({command: 'close
'}))); |
| 522 } | 524 } |
| 523 } | 525 } |
| 524 } | 526 } |
| 525 dart.setSignature(_Manager, { | 527 dart.setSignature(_Manager, { |
| 528 constructors: () => ({_Manager: [_Manager, [core.Function]]}), |
| 526 methods: () => ({ | 529 methods: () => ({ |
| 527 [_nativeDetectEnvironment]: [dart.void, []], | 530 [_nativeDetectEnvironment]: [dart.void, []], |
| 528 [_nativeInitWorkerMessageHandler]: [dart.void, []], | 531 [_nativeInitWorkerMessageHandler]: [dart.void, []], |
| 529 maybeCloseWorker: [dart.void, []] | 532 maybeCloseWorker: [dart.void, []] |
| 530 }), | 533 }), |
| 531 statics: () => ({_serializePrintMessage: [core.Object, [core.Object]]}), | 534 statics: () => ({_serializePrintMessage: [core.Object, [core.Object]]}), |
| 532 names: ['_serializePrintMessage'] | 535 names: ['_serializePrintMessage'] |
| 533 }); | 536 }); |
| 534 let _scheduledControlEvents = Symbol('_scheduledControlEvents'); | 537 let _scheduledControlEvents = Symbol('_scheduledControlEvents'); |
| 535 let _isExecutingEvent = Symbol('_isExecutingEvent'); | 538 let _isExecutingEvent = Symbol('_isExecutingEvent'); |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 789 } | 792 } |
| 790 } | 793 } |
| 791 unregister(portId) { | 794 unregister(portId) { |
| 792 this.ports.remove(portId); | 795 this.ports.remove(portId); |
| 793 this.weakPorts.remove(portId); | 796 this.weakPorts.remove(portId); |
| 794 this[_updateGlobalState](); | 797 this[_updateGlobalState](); |
| 795 } | 798 } |
| 796 } | 799 } |
| 797 _IsolateContext[dart.implements] = () => [_foreign_helper.IsolateContext]; | 800 _IsolateContext[dart.implements] = () => [_foreign_helper.IsolateContext]; |
| 798 dart.setSignature(_IsolateContext, { | 801 dart.setSignature(_IsolateContext, { |
| 802 constructors: () => ({_IsolateContext: [_IsolateContext, []]}), |
| 799 methods: () => ({ | 803 methods: () => ({ |
| 800 addPause: [dart.void, [isolate.Capability, isolate.Capability]], | 804 addPause: [dart.void, [isolate.Capability, isolate.Capability]], |
| 801 removePause: [dart.void, [isolate.Capability]], | 805 removePause: [dart.void, [isolate.Capability]], |
| 802 addDoneListener: [dart.void, [isolate.SendPort]], | 806 addDoneListener: [dart.void, [isolate.SendPort]], |
| 803 removeDoneListener: [dart.void, [isolate.SendPort]], | 807 removeDoneListener: [dart.void, [isolate.SendPort]], |
| 804 setErrorsFatal: [dart.void, [isolate.Capability, core.bool]], | 808 setErrorsFatal: [dart.void, [isolate.Capability, core.bool]], |
| 805 handlePing: [dart.void, [isolate.SendPort, core.int]], | 809 handlePing: [dart.void, [isolate.SendPort, core.int]], |
| 806 handleKill: [dart.void, [isolate.Capability, core.int]], | 810 handleKill: [dart.void, [isolate.Capability, core.int]], |
| 807 addErrorListener: [dart.void, [isolate.SendPort]], | 811 addErrorListener: [dart.void, [isolate.SendPort]], |
| 808 removeErrorListener: [dart.void, [isolate.SendPort]], | 812 removeErrorListener: [dart.void, [isolate.SendPort]], |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 873 this[_runHelper](); | 877 this[_runHelper](); |
| 874 } catch (e) { | 878 } catch (e) { |
| 875 let trace = dart.stackTrace(e); | 879 let trace = dart.stackTrace(e); |
| 876 exports._globalState.mainManager.postMessage(_serializeMessage(dart.ma
p({command: 'error', msg: `${e}\n${trace}`}))); | 880 exports._globalState.mainManager.postMessage(_serializeMessage(dart.ma
p({command: 'error', msg: `${e}\n${trace}`}))); |
| 877 } | 881 } |
| 878 | 882 |
| 879 } | 883 } |
| 880 } | 884 } |
| 881 } | 885 } |
| 882 dart.setSignature(_EventLoop, { | 886 dart.setSignature(_EventLoop, { |
| 887 constructors: () => ({_EventLoop: [_EventLoop, []]}), |
| 883 methods: () => ({ | 888 methods: () => ({ |
| 884 enqueue: [dart.void, [core.Object, core.Object, core.Object]], | 889 enqueue: [dart.void, [core.Object, core.Object, core.Object]], |
| 885 prequeue: [dart.void, [_IsolateEvent]], | 890 prequeue: [dart.void, [_IsolateEvent]], |
| 886 dequeue: [_IsolateEvent, []], | 891 dequeue: [_IsolateEvent, []], |
| 887 checkOpenReceivePortsFromCommandLine: [dart.void, []], | 892 checkOpenReceivePortsFromCommandLine: [dart.void, []], |
| 888 runIteration: [core.bool, []], | 893 runIteration: [core.bool, []], |
| 889 [_runHelper]: [dart.void, []], | 894 [_runHelper]: [dart.void, []], |
| 890 run: [dart.void, []] | 895 run: [dart.void, []] |
| 891 }) | 896 }) |
| 892 }); | 897 }); |
| 893 class _IsolateEvent extends core.Object { | 898 class _IsolateEvent extends core.Object { |
| 894 _IsolateEvent(isolate, fn, message) { | 899 _IsolateEvent(isolate, fn, message) { |
| 895 this.isolate = isolate; | 900 this.isolate = isolate; |
| 896 this.fn = fn; | 901 this.fn = fn; |
| 897 this.message = message; | 902 this.message = message; |
| 898 } | 903 } |
| 899 process() { | 904 process() { |
| 900 if (this.isolate.isPaused) { | 905 if (this.isolate.isPaused) { |
| 901 this.isolate.delayedEvents[core.$add](this); | 906 this.isolate.delayedEvents[core.$add](this); |
| 902 return; | 907 return; |
| 903 } | 908 } |
| 904 this.isolate.eval(this.fn); | 909 this.isolate.eval(this.fn); |
| 905 } | 910 } |
| 906 } | 911 } |
| 907 dart.setSignature(_IsolateEvent, { | 912 dart.setSignature(_IsolateEvent, { |
| 913 constructors: () => ({_IsolateEvent: [_IsolateEvent, [_IsolateContext, core.
Function, core.String]]}), |
| 908 methods: () => ({process: [dart.void, []]}) | 914 methods: () => ({process: [dart.void, []]}) |
| 909 }); | 915 }); |
| 910 class _MainManagerStub extends core.Object { | 916 class _MainManagerStub extends core.Object { |
| 911 postMessage(msg) { | 917 postMessage(msg) { |
| 912 _js_helper.requiresPreamble(); | 918 _js_helper.requiresPreamble(); |
| 913 self.postMessage(msg); | 919 self.postMessage(msg); |
| 914 } | 920 } |
| 915 } | 921 } |
| 916 dart.setSignature(_MainManagerStub, { | 922 dart.setSignature(_MainManagerStub, { |
| 917 methods: () => ({postMessage: [dart.void, [core.Object]]}) | 923 methods: () => ({postMessage: [dart.void, [core.Object]]}) |
| (...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1245 this[_isolateId] = isolateId; | 1251 this[_isolateId] = isolateId; |
| 1246 } | 1252 } |
| 1247 [_checkReplyTo](replyTo) { | 1253 [_checkReplyTo](replyTo) { |
| 1248 if (dart.notNull(replyTo != null) && !dart.is(replyTo, _NativeJsSendPort)
&& !dart.is(replyTo, _WorkerSendPort)) { | 1254 if (dart.notNull(replyTo != null) && !dart.is(replyTo, _NativeJsSendPort)
&& !dart.is(replyTo, _WorkerSendPort)) { |
| 1249 throw new core.Exception("SendPort.send: Illegal replyTo port type"); | 1255 throw new core.Exception("SendPort.send: Illegal replyTo port type"); |
| 1250 } | 1256 } |
| 1251 } | 1257 } |
| 1252 } | 1258 } |
| 1253 _BaseSendPort[dart.implements] = () => [isolate.SendPort]; | 1259 _BaseSendPort[dart.implements] = () => [isolate.SendPort]; |
| 1254 dart.setSignature(_BaseSendPort, { | 1260 dart.setSignature(_BaseSendPort, { |
| 1261 constructors: () => ({_BaseSendPort: [_BaseSendPort, [core.int]]}), |
| 1255 methods: () => ({[_checkReplyTo]: [dart.void, [isolate.SendPort]]}) | 1262 methods: () => ({[_checkReplyTo]: [dart.void, [isolate.SendPort]]}) |
| 1256 }); | 1263 }); |
| 1257 let _isClosed = Symbol('_isClosed'); | 1264 let _isClosed = Symbol('_isClosed'); |
| 1258 let _add = Symbol('_add'); | 1265 let _add = Symbol('_add'); |
| 1259 class _NativeJsSendPort extends _BaseSendPort { | 1266 class _NativeJsSendPort extends _BaseSendPort { |
| 1260 _NativeJsSendPort(receivePort, isolateId) { | 1267 _NativeJsSendPort(receivePort, isolateId) { |
| 1261 this[_receivePort] = receivePort; | 1268 this[_receivePort] = receivePort; |
| 1262 super._BaseSendPort(isolateId); | 1269 super._BaseSendPort(isolateId); |
| 1263 } | 1270 } |
| 1264 send(message) { | 1271 send(message) { |
| (...skipping 15 matching lines...) Expand all Loading... |
| 1280 } | 1287 } |
| 1281 ['=='](other) { | 1288 ['=='](other) { |
| 1282 return dart.is(other, _NativeJsSendPort) && dart.notNull(dart.equals(this[
_receivePort], dart.dload(other, _receivePort))); | 1289 return dart.is(other, _NativeJsSendPort) && dart.notNull(dart.equals(this[
_receivePort], dart.dload(other, _receivePort))); |
| 1283 } | 1290 } |
| 1284 get hashCode() { | 1291 get hashCode() { |
| 1285 return this[_receivePort][_id]; | 1292 return this[_receivePort][_id]; |
| 1286 } | 1293 } |
| 1287 } | 1294 } |
| 1288 _NativeJsSendPort[dart.implements] = () => [isolate.SendPort]; | 1295 _NativeJsSendPort[dart.implements] = () => [isolate.SendPort]; |
| 1289 dart.setSignature(_NativeJsSendPort, { | 1296 dart.setSignature(_NativeJsSendPort, { |
| 1297 constructors: () => ({_NativeJsSendPort: [_NativeJsSendPort, [RawReceivePort
Impl, core.int]]}), |
| 1290 methods: () => ({send: [dart.void, [core.Object]]}) | 1298 methods: () => ({send: [dart.void, [core.Object]]}) |
| 1291 }); | 1299 }); |
| 1292 class _WorkerSendPort extends _BaseSendPort { | 1300 class _WorkerSendPort extends _BaseSendPort { |
| 1293 _WorkerSendPort(workerId, isolateId, receivePortId) { | 1301 _WorkerSendPort(workerId, isolateId, receivePortId) { |
| 1294 this[_workerId] = workerId; | 1302 this[_workerId] = workerId; |
| 1295 this[_receivePortId] = receivePortId; | 1303 this[_receivePortId] = receivePortId; |
| 1296 super._BaseSendPort(isolateId); | 1304 super._BaseSendPort(isolateId); |
| 1297 } | 1305 } |
| 1298 send(message) { | 1306 send(message) { |
| 1299 let workerMessage = _serializeMessage(dart.map({command: 'message', port:
this, msg: message})); | 1307 let workerMessage = _serializeMessage(dart.map({command: 'message', port:
this, msg: message})); |
| 1300 if (exports._globalState.isWorker) { | 1308 if (exports._globalState.isWorker) { |
| 1301 exports._globalState.mainManager.postMessage(workerMessage); | 1309 exports._globalState.mainManager.postMessage(workerMessage); |
| 1302 } else { | 1310 } else { |
| 1303 let manager = exports._globalState.managers.get(this[_workerId]); | 1311 let manager = exports._globalState.managers.get(this[_workerId]); |
| 1304 if (manager != null) { | 1312 if (manager != null) { |
| 1305 manager.postMessage(workerMessage); | 1313 manager.postMessage(workerMessage); |
| 1306 } | 1314 } |
| 1307 } | 1315 } |
| 1308 } | 1316 } |
| 1309 ['=='](other) { | 1317 ['=='](other) { |
| 1310 return dart.is(other, _WorkerSendPort) && dart.equals(this[_workerId], dar
t.dload(other, _workerId)) && dart.equals(this[_isolateId], dart.dload(other, _i
solateId)) && dart.equals(this[_receivePortId], dart.dload(other, _receivePortId
)); | 1318 return dart.is(other, _WorkerSendPort) && dart.equals(this[_workerId], dar
t.dload(other, _workerId)) && dart.equals(this[_isolateId], dart.dload(other, _i
solateId)) && dart.equals(this[_receivePortId], dart.dload(other, _receivePortId
)); |
| 1311 } | 1319 } |
| 1312 get hashCode() { | 1320 get hashCode() { |
| 1313 return dart.notNull(this[_workerId]) << 16 ^ dart.notNull(this[_isolateId]
) << 8 ^ dart.notNull(this[_receivePortId]); | 1321 return dart.notNull(this[_workerId]) << 16 ^ dart.notNull(this[_isolateId]
) << 8 ^ dart.notNull(this[_receivePortId]); |
| 1314 } | 1322 } |
| 1315 } | 1323 } |
| 1316 _WorkerSendPort[dart.implements] = () => [isolate.SendPort]; | 1324 _WorkerSendPort[dart.implements] = () => [isolate.SendPort]; |
| 1317 dart.setSignature(_WorkerSendPort, { | 1325 dart.setSignature(_WorkerSendPort, { |
| 1326 constructors: () => ({_WorkerSendPort: [_WorkerSendPort, [core.int, core.int
, core.int]]}), |
| 1318 methods: () => ({send: [dart.void, [core.Object]]}) | 1327 methods: () => ({send: [dart.void, [core.Object]]}) |
| 1319 }); | 1328 }); |
| 1320 let _handler = Symbol('_handler'); | 1329 let _handler = Symbol('_handler'); |
| 1321 class RawReceivePortImpl extends core.Object { | 1330 class RawReceivePortImpl extends core.Object { |
| 1322 RawReceivePortImpl(handler) { | 1331 RawReceivePortImpl(handler) { |
| 1323 this[_handler] = handler; | 1332 this[_handler] = handler; |
| 1324 this[_id] = (() => { | 1333 this[_id] = (() => { |
| 1325 let x = RawReceivePortImpl._nextFreeId; | 1334 let x = RawReceivePortImpl._nextFreeId; |
| 1326 RawReceivePortImpl._nextFreeId = dart.notNull(x) + 1; | 1335 RawReceivePortImpl._nextFreeId = dart.notNull(x) + 1; |
| 1327 return x; | 1336 return x; |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1364 dart.dcall(this[_handler], dataEvent); | 1373 dart.dcall(this[_handler], dataEvent); |
| 1365 } | 1374 } |
| 1366 get sendPort() { | 1375 get sendPort() { |
| 1367 return new _NativeJsSendPort(this, exports._globalState.currentContext.id)
; | 1376 return new _NativeJsSendPort(this, exports._globalState.currentContext.id)
; |
| 1368 } | 1377 } |
| 1369 } | 1378 } |
| 1370 RawReceivePortImpl[dart.implements] = () => [isolate.RawReceivePort]; | 1379 RawReceivePortImpl[dart.implements] = () => [isolate.RawReceivePort]; |
| 1371 dart.defineNamedConstructor(RawReceivePortImpl, 'weak'); | 1380 dart.defineNamedConstructor(RawReceivePortImpl, 'weak'); |
| 1372 dart.defineNamedConstructor(RawReceivePortImpl, '_controlPort'); | 1381 dart.defineNamedConstructor(RawReceivePortImpl, '_controlPort'); |
| 1373 dart.setSignature(RawReceivePortImpl, { | 1382 dart.setSignature(RawReceivePortImpl, { |
| 1383 constructors: () => ({ |
| 1384 RawReceivePortImpl: [RawReceivePortImpl, [core.Function]], |
| 1385 weak: [RawReceivePortImpl, [core.Function]], |
| 1386 _controlPort: [RawReceivePortImpl, []] |
| 1387 }), |
| 1374 methods: () => ({ | 1388 methods: () => ({ |
| 1375 [_close]: [dart.void, []], | 1389 [_close]: [dart.void, []], |
| 1376 close: [dart.void, []], | 1390 close: [dart.void, []], |
| 1377 [_add]: [dart.void, [core.Object]] | 1391 [_add]: [dart.void, [core.Object]] |
| 1378 }) | 1392 }) |
| 1379 }); | 1393 }); |
| 1380 RawReceivePortImpl._nextFreeId = 1; | 1394 RawReceivePortImpl._nextFreeId = 1; |
| 1381 let _rawPort = Symbol('_rawPort'); | 1395 let _rawPort = Symbol('_rawPort'); |
| 1382 let _controller = Symbol('_controller'); | 1396 let _controller = Symbol('_controller'); |
| 1383 class ReceivePortImpl extends async.Stream { | 1397 class ReceivePortImpl extends async.Stream { |
| (...skipping 21 matching lines...) Expand all Loading... |
| 1405 this[_controller].close(); | 1419 this[_controller].close(); |
| 1406 } | 1420 } |
| 1407 get sendPort() { | 1421 get sendPort() { |
| 1408 return this[_rawPort].sendPort; | 1422 return this[_rawPort].sendPort; |
| 1409 } | 1423 } |
| 1410 } | 1424 } |
| 1411 ReceivePortImpl[dart.implements] = () => [isolate.ReceivePort]; | 1425 ReceivePortImpl[dart.implements] = () => [isolate.ReceivePort]; |
| 1412 dart.defineNamedConstructor(ReceivePortImpl, 'weak'); | 1426 dart.defineNamedConstructor(ReceivePortImpl, 'weak'); |
| 1413 dart.defineNamedConstructor(ReceivePortImpl, 'fromRawReceivePort'); | 1427 dart.defineNamedConstructor(ReceivePortImpl, 'fromRawReceivePort'); |
| 1414 dart.setSignature(ReceivePortImpl, { | 1428 dart.setSignature(ReceivePortImpl, { |
| 1429 constructors: () => ({ |
| 1430 ReceivePortImpl: [ReceivePortImpl, []], |
| 1431 weak: [ReceivePortImpl, []], |
| 1432 fromRawReceivePort: [ReceivePortImpl, [isolate.RawReceivePort]] |
| 1433 }), |
| 1415 methods: () => ({ | 1434 methods: () => ({ |
| 1416 listen: [async.StreamSubscription, [dart.functionType(dart.void, [dart.bot
tom])], {nErro: core.Function, nDon: dart.functionType(dart.void, []), ancelOnEr
ro: core.bool}], | 1435 listen: [async.StreamSubscription, [dart.functionType(dart.void, [dart.bot
tom])], {nErro: core.Function, nDon: dart.functionType(dart.void, []), ancelOnEr
ro: core.bool}], |
| 1417 close: [dart.void, []] | 1436 close: [dart.void, []] |
| 1418 }) | 1437 }) |
| 1419 }); | 1438 }); |
| 1420 let _once = Symbol('_once'); | 1439 let _once = Symbol('_once'); |
| 1421 let _inEventLoop = Symbol('_inEventLoop'); | 1440 let _inEventLoop = Symbol('_inEventLoop'); |
| 1422 let _handle = Symbol('_handle'); | 1441 let _handle = Symbol('_handle'); |
| 1423 class TimerImpl extends core.Object { | 1442 class TimerImpl extends core.Object { |
| 1424 TimerImpl(milliseconds, callback) { | 1443 TimerImpl(milliseconds, callback) { |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1479 throw new core.UnsupportedError("Canceling a timer."); | 1498 throw new core.UnsupportedError("Canceling a timer."); |
| 1480 } | 1499 } |
| 1481 } | 1500 } |
| 1482 get isActive() { | 1501 get isActive() { |
| 1483 return this[_handle] != null; | 1502 return this[_handle] != null; |
| 1484 } | 1503 } |
| 1485 } | 1504 } |
| 1486 TimerImpl[dart.implements] = () => [async.Timer]; | 1505 TimerImpl[dart.implements] = () => [async.Timer]; |
| 1487 dart.defineNamedConstructor(TimerImpl, 'periodic'); | 1506 dart.defineNamedConstructor(TimerImpl, 'periodic'); |
| 1488 dart.setSignature(TimerImpl, { | 1507 dart.setSignature(TimerImpl, { |
| 1508 constructors: () => ({ |
| 1509 TimerImpl: [TimerImpl, [core.int, dart.functionType(dart.void, [])]], |
| 1510 periodic: [TimerImpl, [core.int, dart.functionType(dart.void, [async.Timer
])]] |
| 1511 }), |
| 1489 methods: () => ({cancel: [dart.void, []]}) | 1512 methods: () => ({cancel: [dart.void, []]}) |
| 1490 }); | 1513 }); |
| 1491 function hasTimer() { | 1514 function hasTimer() { |
| 1492 _js_helper.requiresPreamble(); | 1515 _js_helper.requiresPreamble(); |
| 1493 return self.setTimeout != null; | 1516 return self.setTimeout != null; |
| 1494 } | 1517 } |
| 1495 dart.fn(hasTimer, core.bool, []); | 1518 dart.fn(hasTimer, core.bool, []); |
| 1496 class CapabilityImpl extends core.Object { | 1519 class CapabilityImpl extends core.Object { |
| 1497 CapabilityImpl() { | 1520 CapabilityImpl() { |
| 1498 this._internal(_js_helper.random64()); | 1521 this._internal(_js_helper.random64()); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 1516 return true; | 1539 return true; |
| 1517 if (dart.is(other, CapabilityImpl)) { | 1540 if (dart.is(other, CapabilityImpl)) { |
| 1518 return core.identical(this[_id], other[_id]); | 1541 return core.identical(this[_id], other[_id]); |
| 1519 } | 1542 } |
| 1520 return false; | 1543 return false; |
| 1521 } | 1544 } |
| 1522 } | 1545 } |
| 1523 CapabilityImpl[dart.implements] = () => [isolate.Capability]; | 1546 CapabilityImpl[dart.implements] = () => [isolate.Capability]; |
| 1524 dart.defineNamedConstructor(CapabilityImpl, '_internal'); | 1547 dart.defineNamedConstructor(CapabilityImpl, '_internal'); |
| 1525 dart.setSignature(CapabilityImpl, { | 1548 dart.setSignature(CapabilityImpl, { |
| 1549 constructors: () => ({ |
| 1550 CapabilityImpl: [CapabilityImpl, []], |
| 1551 _internal: [CapabilityImpl, [core.int]] |
| 1552 }), |
| 1526 methods: () => ({'==': [core.bool, [core.Object]]}) | 1553 methods: () => ({'==': [core.bool, [core.Object]]}) |
| 1527 }); | 1554 }); |
| 1528 // Exports: | 1555 // Exports: |
| 1529 exports.enterJsAsync = enterJsAsync; | 1556 exports.enterJsAsync = enterJsAsync; |
| 1530 exports.leaveJsAsync = leaveJsAsync; | 1557 exports.leaveJsAsync = leaveJsAsync; |
| 1531 exports.isWorker = isWorker; | 1558 exports.isWorker = isWorker; |
| 1532 exports.startRootIsolate = startRootIsolate; | 1559 exports.startRootIsolate = startRootIsolate; |
| 1533 exports.IsolateNatives = IsolateNatives; | 1560 exports.IsolateNatives = IsolateNatives; |
| 1534 exports.RawReceivePortImpl = RawReceivePortImpl; | 1561 exports.RawReceivePortImpl = RawReceivePortImpl; |
| 1535 exports.ReceivePortImpl = ReceivePortImpl; | 1562 exports.ReceivePortImpl = ReceivePortImpl; |
| 1536 exports.TimerImpl = TimerImpl; | 1563 exports.TimerImpl = TimerImpl; |
| 1537 exports.hasTimer = hasTimer; | 1564 exports.hasTimer = hasTimer; |
| 1538 exports.CapabilityImpl = CapabilityImpl; | 1565 exports.CapabilityImpl = CapabilityImpl; |
| 1539 })(_isolate_helper, core, _native_typed_data, _interceptors, _js_helper, isolate
, _foreign_helper, _js_embedded_names, collection, async); | 1566 })(_isolate_helper, core, _native_typed_data, _interceptors, _js_helper, isolate
, _foreign_helper, _js_embedded_names, collection, async); |
| OLD | NEW |