| 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 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 405 rootContext.eval(() => { | 405 rootContext.eval(() => { |
| 406 dart.dcall(entry, args, null); | 406 dart.dcall(entry, args, null); |
| 407 }); | 407 }); |
| 408 } else { | 408 } else { |
| 409 rootContext.eval(dart.as(entry, core.Function)); | 409 rootContext.eval(dart.as(entry, core.Function)); |
| 410 } | 410 } |
| 411 exports._globalState.topEventLoop.run(); | 411 exports._globalState.topEventLoop.run(); |
| 412 } | 412 } |
| 413 dart.copyProperties(exports, { | 413 dart.copyProperties(exports, { |
| 414 get _globalState() { | 414 get _globalState() { |
| 415 return dart.as(init.globalState, _Manager); | 415 return dart.as(dart.globalState, _Manager); |
| 416 }, | 416 }, |
| 417 set _globalState(val) { | 417 set _globalState(val) { |
| 418 init.globalState = val; | 418 dart.globalState = val; |
| 419 } | 419 } |
| 420 }); | 420 }); |
| 421 let _nativeDetectEnvironment = Symbol('_nativeDetectEnvironment'); | 421 let _nativeDetectEnvironment = Symbol('_nativeDetectEnvironment'); |
| 422 let _nativeInitWorkerMessageHandler = Symbol('_nativeInitWorkerMessageHandler'
); | 422 let _nativeInitWorkerMessageHandler = Symbol('_nativeInitWorkerMessageHandler'
); |
| 423 class _Manager extends core.Object { | 423 class _Manager extends core.Object { |
| 424 get useWorkers() { | 424 get useWorkers() { |
| 425 return this.supportsWorkers; | 425 return this.supportsWorkers; |
| 426 } | 426 } |
| 427 _Manager(entry) { | 427 _Manager(entry) { |
| 428 this.entry = entry; | 428 this.entry = entry; |
| (...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 771 if (event == null) { | 771 if (event == null) { |
| 772 this.checkOpenReceivePortsFromCommandLine(); | 772 this.checkOpenReceivePortsFromCommandLine(); |
| 773 exports._globalState.maybeCloseWorker(); | 773 exports._globalState.maybeCloseWorker(); |
| 774 return false; | 774 return false; |
| 775 } | 775 } |
| 776 event.process(); | 776 event.process(); |
| 777 return true; | 777 return true; |
| 778 } | 778 } |
| 779 [_runHelper]() { | 779 [_runHelper]() { |
| 780 if (exports.globalWindow != null) { | 780 if (exports.globalWindow != null) { |
| 781 // Function next: () → void | |
| 782 let next = (() => { | 781 let next = (() => { |
| 783 if (!dart.notNull(this.runIteration())) | 782 if (!dart.notNull(this.runIteration())) |
| 784 return; | 783 return; |
| 785 async.Timer.run(next); | 784 async.Timer.run(dart.as(next, __CastType2)); |
| 786 }).bind(this); | 785 }).bind(this); |
| 787 next(); | 786 dart.dcall(next); |
| 788 } else { | 787 } else { |
| 789 while (this.runIteration()) { | 788 while (this.runIteration()) { |
| 790 } | 789 } |
| 791 } | 790 } |
| 792 } | 791 } |
| 793 run() { | 792 run() { |
| 794 if (!dart.notNull(exports._globalState.isWorker)) { | 793 if (!dart.notNull(exports._globalState.isWorker)) { |
| 795 this[_runHelper](); | 794 this[_runHelper](); |
| 796 } else { | 795 } else { |
| 797 try { | 796 try { |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 838 get globalPostMessageDefined() { | 837 get globalPostMessageDefined() { |
| 839 _js_helper.requiresPreamble(); | 838 _js_helper.requiresPreamble(); |
| 840 return !!self.postMessage; | 839 return !!self.postMessage; |
| 841 } | 840 } |
| 842 }); | 841 }); |
| 843 let _MainFunction = dart.typedef('_MainFunction', () => dart.functionType(dart
.dynamic, [])); | 842 let _MainFunction = dart.typedef('_MainFunction', () => dart.functionType(dart
.dynamic, [])); |
| 844 let _MainFunctionArgs = dart.typedef('_MainFunctionArgs', () => dart.functionT
ype(dart.dynamic, [dart.dynamic])); | 843 let _MainFunctionArgs = dart.typedef('_MainFunctionArgs', () => dart.functionT
ype(dart.dynamic, [dart.dynamic])); |
| 845 let _MainFunctionArgsMessage = dart.typedef('_MainFunctionArgsMessage', () =>
dart.functionType(dart.dynamic, [dart.dynamic, dart.dynamic])); | 844 let _MainFunctionArgsMessage = dart.typedef('_MainFunctionArgsMessage', () =>
dart.functionType(dart.dynamic, [dart.dynamic, dart.dynamic])); |
| 846 class IsolateNatives extends core.Object { | 845 class IsolateNatives extends core.Object { |
| 847 static computeThisScript() { | 846 static computeThisScript() { |
| 848 let currentScript = _foreign_helper.JS_EMBEDDED_GLOBAL('', _js_embedded_na
mes.CURRENT_SCRIPT); | 847 let currentScript = document.currentScript; |
| 849 if (currentScript != null) { | 848 if (currentScript != null) { |
| 850 return String(currentScript.src); | 849 return String(currentScript.src); |
| 851 } | 850 } |
| 852 if (_js_helper.Primitives.isD8) | 851 if (_js_helper.Primitives.isD8) |
| 853 return IsolateNatives.computeThisScriptD8(); | 852 return IsolateNatives.computeThisScriptD8(); |
| 854 if (_js_helper.Primitives.isJsshell) | 853 if (_js_helper.Primitives.isJsshell) |
| 855 return IsolateNatives.computeThisScriptJsshell(); | 854 return IsolateNatives.computeThisScriptJsshell(); |
| 856 if (exports._globalState.isWorker) | 855 if (exports._globalState.isWorker) |
| 857 return IsolateNatives.computeThisScriptFromTrace(); | 856 return IsolateNatives.computeThisScriptFromTrace(); |
| 858 return null; | 857 return null; |
| (...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1375 if (core.identical(other, this)) | 1374 if (core.identical(other, this)) |
| 1376 return true; | 1375 return true; |
| 1377 if (dart.is(other, CapabilityImpl)) { | 1376 if (dart.is(other, CapabilityImpl)) { |
| 1378 return core.identical(this[_id], other[_id]); | 1377 return core.identical(this[_id], other[_id]); |
| 1379 } | 1378 } |
| 1380 return false; | 1379 return false; |
| 1381 } | 1380 } |
| 1382 } | 1381 } |
| 1383 CapabilityImpl[dart.implements] = () => [isolate.Capability]; | 1382 CapabilityImpl[dart.implements] = () => [isolate.Capability]; |
| 1384 dart.defineNamedConstructor(CapabilityImpl, '_internal'); | 1383 dart.defineNamedConstructor(CapabilityImpl, '_internal'); |
| 1384 let __CastType2 = dart.typedef('__CastType2', () => dart.functionType(dart.voi
d, [])); |
| 1385 // Exports: | 1385 // Exports: |
| 1386 exports.enterJsAsync = enterJsAsync; | 1386 exports.enterJsAsync = enterJsAsync; |
| 1387 exports.leaveJsAsync = leaveJsAsync; | 1387 exports.leaveJsAsync = leaveJsAsync; |
| 1388 exports.isWorker = isWorker; | 1388 exports.isWorker = isWorker; |
| 1389 exports.startRootIsolate = startRootIsolate; | 1389 exports.startRootIsolate = startRootIsolate; |
| 1390 exports.IsolateNatives = IsolateNatives; | 1390 exports.IsolateNatives = IsolateNatives; |
| 1391 exports.RawReceivePortImpl = RawReceivePortImpl; | 1391 exports.RawReceivePortImpl = RawReceivePortImpl; |
| 1392 exports.ReceivePortImpl = ReceivePortImpl; | 1392 exports.ReceivePortImpl = ReceivePortImpl; |
| 1393 exports.TimerImpl = TimerImpl; | 1393 exports.TimerImpl = TimerImpl; |
| 1394 exports.hasTimer = hasTimer; | 1394 exports.hasTimer = hasTimer; |
| 1395 exports.CapabilityImpl = CapabilityImpl; | 1395 exports.CapabilityImpl = CapabilityImpl; |
| 1396 })(_isolate_helper, core, _native_typed_data, _interceptors, _js_helper, isolate
, _foreign_helper, _js_embedded_names, collection, async); | 1396 })(_isolate_helper, core, _native_typed_data, _interceptors, _js_helper, isolate
, _foreign_helper, _js_embedded_names, collection, async); |
| OLD | NEW |