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

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

Issue 1052693004: move => bind this workaround to js_ast (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/core.js ('k') | lib/src/codegen/js_codegen.dart » ('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 isolate; 1 var isolate;
2 (function(exports) { 2 (function(exports) {
3 'use strict'; 3 'use strict';
4 class Capability extends core.Object { 4 class Capability extends core.Object {
5 Capability() { 5 Capability() {
6 return new _isolate_helper.CapabilityImpl(); 6 return new _isolate_helper.CapabilityImpl();
7 } 7 }
8 } 8 }
9 class IsolateSpawnException extends core.Object { 9 class IsolateSpawnException extends core.Object {
10 IsolateSpawnException(message) { 10 IsolateSpawnException(message) {
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 get errors() { 129 get errors() {
130 let controller = null; 130 let controller = null;
131 let port = null; 131 let port = null;
132 // Function handleError: (dynamic) → void 132 // Function handleError: (dynamic) → void
133 function handleError(message) { 133 function handleError(message) {
134 let errorDescription = dart.as(dart.dindex(message, 0), core.String); 134 let errorDescription = dart.as(dart.dindex(message, 0), core.String);
135 let stackDescription = dart.as(dart.dindex(message, 1), core.String); 135 let stackDescription = dart.as(dart.dindex(message, 1), core.String);
136 let error = new RemoteError(errorDescription, stackDescription); 136 let error = new RemoteError(errorDescription, stackDescription);
137 controller.addError(error, error.stackTrace); 137 controller.addError(error, error.stackTrace);
138 } 138 }
139 controller = new async.StreamController.broadcast({sync: true, onListen: ( () => { 139 controller = new async.StreamController.broadcast({
140 sync: true,
141 onListen: (() => {
140 port = new RawReceivePort(handleError); 142 port = new RawReceivePort(handleError);
141 this.addErrorListener(port.sendPort); 143 this.addErrorListener(port.sendPort);
142 }).bind(this), onCancel: (() => { 144 }).bind(this),
145 onCancel: (() => {
143 this.removeErrorListener(port.sendPort); 146 this.removeErrorListener(port.sendPort);
144 port.close(); 147 port.close();
145 port = null; 148 port = null;
146 }).bind(this)}); 149 }).bind(this)
150 });
147 return controller.stream; 151 return controller.stream;
148 } 152 }
149 } 153 }
150 Isolate.IMMEDIATE = 0; 154 Isolate.IMMEDIATE = 0;
151 Isolate.BEFORE_NEXT_EVENT = 1; 155 Isolate.BEFORE_NEXT_EVENT = 1;
152 Isolate.AS_EVENT = 2; 156 Isolate.AS_EVENT = 2;
153 dart.defineLazyProperties(Isolate, { 157 dart.defineLazyProperties(Isolate, {
154 get _currentIsolateCache() { 158 get _currentIsolateCache() {
155 return _isolate_helper.IsolateNatives.currentIsolate; 159 return _isolate_helper.IsolateNatives.currentIsolate;
156 } 160 }
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 _RemoteStackTrace[dart.implements] = () => [core.StackTrace]; 213 _RemoteStackTrace[dart.implements] = () => [core.StackTrace];
210 // Exports: 214 // Exports:
211 exports.Capability = Capability; 215 exports.Capability = Capability;
212 exports.IsolateSpawnException = IsolateSpawnException; 216 exports.IsolateSpawnException = IsolateSpawnException;
213 exports.Isolate = Isolate; 217 exports.Isolate = Isolate;
214 exports.SendPort = SendPort; 218 exports.SendPort = SendPort;
215 exports.ReceivePort = ReceivePort; 219 exports.ReceivePort = ReceivePort;
216 exports.RawReceivePort = RawReceivePort; 220 exports.RawReceivePort = RawReceivePort;
217 exports.RemoteError = RemoteError; 221 exports.RemoteError = RemoteError;
218 })(isolate || (isolate = {})); 222 })(isolate || (isolate = {}));
OLDNEW
« no previous file with comments | « lib/runtime/dart/core.js ('k') | lib/src/codegen/js_codegen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698