| OLD | NEW |
| 1 var isolate = dart.defineLibrary(isolate, {}); | 1 var isolate = dart.defineLibrary(isolate, {}); |
| 2 var core = dart.import(core); | 2 var core = dart.import(core); |
| 3 var _isolate_helper = dart.lazyImport(_isolate_helper); | 3 var _isolate_helper = dart.lazyImport(_isolate_helper); |
| 4 var async = dart.import(async); | 4 var async = dart.import(async); |
| 5 (function(exports, core, _isolate_helper, async) { | 5 (function(exports, core, _isolate_helper, async) { |
| 6 'use strict'; | 6 'use strict'; |
| 7 class Capability extends core.Object { | 7 class Capability extends core.Object { |
| 8 static new() { | 8 static new() { |
| 9 return new _isolate_helper.CapabilityImpl(); | 9 return new _isolate_helper.CapabilityImpl(); |
| 10 } | 10 } |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 get errors() { | 137 get errors() { |
| 138 let controller = null; | 138 let controller = null; |
| 139 let port = null; | 139 let port = null; |
| 140 let handleError = message => { | 140 let handleError = message => { |
| 141 let errorDescription = dart.as(dart.dindex(message, 0), core.String); | 141 let errorDescription = dart.as(dart.dindex(message, 0), core.String); |
| 142 let stackDescription = dart.as(dart.dindex(message, 1), core.String); | 142 let stackDescription = dart.as(dart.dindex(message, 1), core.String); |
| 143 let error = new RemoteError(errorDescription, stackDescription); | 143 let error = new RemoteError(errorDescription, stackDescription); |
| 144 controller.addError(error, error.stackTrace); | 144 controller.addError(error, error.stackTrace); |
| 145 }; | 145 }; |
| 146 dart.fn(handleError, dart.void, [core.Object]); | 146 dart.fn(handleError, dart.void, [core.Object]); |
| 147 controller = async.StreamController.broadcast({sync: true, onListen: dart.
fn((() => { | 147 controller = async.StreamController.broadcast({sync: true, onListen: dart.
fn(() => { |
| 148 port = RawReceivePort.new(handleError); | 148 port = RawReceivePort.new(handleError); |
| 149 this.addErrorListener(port.sendPort); | 149 this.addErrorListener(port.sendPort); |
| 150 }).bind(this)), onCancel: dart.fn((() => { | 150 }), onCancel: dart.fn(() => { |
| 151 this.removeErrorListener(port.sendPort); | 151 this.removeErrorListener(port.sendPort); |
| 152 port.close(); | 152 port.close(); |
| 153 port = null; | 153 port = null; |
| 154 }).bind(this))}); | 154 })}); |
| 155 return controller.stream; | 155 return controller.stream; |
| 156 } | 156 } |
| 157 } | 157 } |
| 158 dart.setSignature(Isolate, { | 158 dart.setSignature(Isolate, { |
| 159 constructors: () => ({Isolate: [Isolate, [SendPort], {pauseCapability: Capab
ility, terminateCapability: Capability}]}), | 159 constructors: () => ({Isolate: [Isolate, [SendPort], {pauseCapability: Capab
ility, terminateCapability: Capability}]}), |
| 160 methods: () => ({ | 160 methods: () => ({ |
| 161 pause: [Capability, [], [Capability]], | 161 pause: [Capability, [], [Capability]], |
| 162 [_pause]: [dart.void, [Capability]], | 162 [_pause]: [dart.void, [Capability]], |
| 163 resume: [dart.void, [Capability]], | 163 resume: [dart.void, [Capability]], |
| 164 addOnExitListener: [dart.void, [SendPort]], | 164 addOnExitListener: [dart.void, [SendPort]], |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 }); | 253 }); |
| 254 // Exports: | 254 // Exports: |
| 255 exports.Capability = Capability; | 255 exports.Capability = Capability; |
| 256 exports.IsolateSpawnException = IsolateSpawnException; | 256 exports.IsolateSpawnException = IsolateSpawnException; |
| 257 exports.Isolate = Isolate; | 257 exports.Isolate = Isolate; |
| 258 exports.SendPort = SendPort; | 258 exports.SendPort = SendPort; |
| 259 exports.ReceivePort = ReceivePort; | 259 exports.ReceivePort = ReceivePort; |
| 260 exports.RawReceivePort = RawReceivePort; | 260 exports.RawReceivePort = RawReceivePort; |
| 261 exports.RemoteError = RemoteError; | 261 exports.RemoteError = RemoteError; |
| 262 })(isolate, core, _isolate_helper, async); | 262 })(isolate, core, _isolate_helper, async); |
| OLD | NEW |