OLD | NEW |
1 var isolate; | 1 var isolate; |
2 (function(isolate) { | 2 (function(isolate) { |
3 'use strict'; | 3 'use strict'; |
| 4 let _pause = Symbol('_pause'); |
| 5 let _description = Symbol('_description'); |
| 6 let _trace = Symbol('_trace'); |
4 class IsolateSpawnException extends dart.Object { | 7 class IsolateSpawnException extends dart.Object { |
5 IsolateSpawnException(message) { | 8 IsolateSpawnException(message) { |
6 this.message = message; | 9 this.message = message; |
7 } | 10 } |
8 toString() { | 11 toString() { |
9 return `IsolateSpawnException: ${this.message}`; | 12 return `IsolateSpawnException: ${this.message}`; |
10 } | 13 } |
11 } | 14 } |
12 class Isolate extends dart.Object { | 15 class Isolate extends dart.Object { |
13 Isolate(controlPort, opt$) { | 16 Isolate(controlPort, opt$) { |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 let st = dart.stackTrace(e); | 53 let st = dart.stackTrace(e); |
51 return new async.Future.error(e, st); | 54 return new async.Future.error(e, st); |
52 } | 55 } |
53 | 56 |
54 } | 57 } |
55 pause(resumeCapability) { | 58 pause(resumeCapability) { |
56 if (resumeCapability === void 0) | 59 if (resumeCapability === void 0) |
57 resumeCapability = null; | 60 resumeCapability = null; |
58 if (resumeCapability === null) | 61 if (resumeCapability === null) |
59 resumeCapability = new Capability(); | 62 resumeCapability = new Capability(); |
60 this._pause(resumeCapability); | 63 this[_pause](resumeCapability); |
61 return resumeCapability; | 64 return resumeCapability; |
62 } | 65 } |
63 _pause(resumeCapability) { | 66 [_pause](resumeCapability) { |
64 let message = new core.List(3); | 67 let message = new core.List(3); |
65 dart.dsetindex(message, 0, "pause"); | 68 dart.dsetindex(message, 0, "pause"); |
66 dart.dsetindex(message, 1, this.pauseCapability); | 69 dart.dsetindex(message, 1, this.pauseCapability); |
67 dart.dsetindex(message, 2, resumeCapability); | 70 dart.dsetindex(message, 2, resumeCapability); |
68 this.controlPort.send(message); | 71 this.controlPort.send(message); |
69 } | 72 } |
70 resume(resumeCapability) { | 73 resume(resumeCapability) { |
71 let message = new core.List(2); | 74 let message = new core.List(2); |
72 dart.dsetindex(message, 0, "resume"); | 75 dart.dsetindex(message, 0, "resume"); |
73 dart.dsetindex(message, 1, resumeCapability); | 76 dart.dsetindex(message, 1, resumeCapability); |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 this.message = message; | 173 this.message = message; |
171 this.source = source; | 174 this.source = source; |
172 this.stackTrace = stackTrace; | 175 this.stackTrace = stackTrace; |
173 } | 176 } |
174 toString() { | 177 toString() { |
175 return 'IsolateUnhandledException: exception while handling message: ' + `
${this.message} \n ` + `${dart.dinvoke(dart.dinvoke(this.source, 'toString'), '
replaceAll', "\n", "\n ")}\n` + 'original stack trace:\n ' + `${this.stackTrac
e.toString().replaceAll("\n", "\n ")}`; | 178 return 'IsolateUnhandledException: exception while handling message: ' + `
${this.message} \n ` + `${dart.dinvoke(dart.dinvoke(this.source, 'toString'), '
replaceAll', "\n", "\n ")}\n` + 'original stack trace:\n ' + `${this.stackTrac
e.toString().replaceAll("\n", "\n ")}`; |
176 } | 179 } |
177 } | 180 } |
178 class RemoteError extends dart.Object { | 181 class RemoteError extends dart.Object { |
179 RemoteError(description, stackDescription) { | 182 RemoteError(description, stackDescription) { |
180 this._description = description; | 183 this[_description] = description; |
181 this.stackTrace = new _RemoteStackTrace(stackDescription); | 184 this.stackTrace = new _RemoteStackTrace(stackDescription); |
182 } | 185 } |
183 toString() { | 186 toString() { |
184 return this._description; | 187 return this[_description]; |
185 } | 188 } |
186 } | 189 } |
187 class _RemoteStackTrace extends dart.Object { | 190 class _RemoteStackTrace extends dart.Object { |
188 _RemoteStackTrace(_trace) { | 191 _RemoteStackTrace($_trace) { |
189 this._trace = _trace; | 192 this[_trace] = $_trace; |
190 } | 193 } |
191 toString() { | 194 toString() { |
192 return this._trace; | 195 return this[_trace]; |
193 } | 196 } |
194 } | 197 } |
195 class Capability extends dart.Object { | 198 class Capability extends dart.Object { |
196 Capability() { | 199 Capability() { |
197 return new _isolate_helper.CapabilityImpl(); | 200 return new _isolate_helper.CapabilityImpl(); |
198 } | 201 } |
199 } | 202 } |
200 // Exports: | 203 // Exports: |
201 isolate.IsolateSpawnException = IsolateSpawnException; | 204 isolate.IsolateSpawnException = IsolateSpawnException; |
202 isolate.Isolate = Isolate; | 205 isolate.Isolate = Isolate; |
203 isolate.SendPort = SendPort; | 206 isolate.SendPort = SendPort; |
204 isolate.ReceivePort = ReceivePort; | 207 isolate.ReceivePort = ReceivePort; |
205 isolate.RawReceivePort = RawReceivePort; | 208 isolate.RawReceivePort = RawReceivePort; |
206 isolate.RemoteError = RemoteError; | 209 isolate.RemoteError = RemoteError; |
207 isolate.Capability = Capability; | 210 isolate.Capability = Capability; |
208 })(isolate || (isolate = {})); | 211 })(isolate || (isolate = {})); |
OLD | NEW |