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

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

Issue 1263593003: restore arrow function bind this workaround (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 4 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/convert.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 dart_library.library('dart/isolate', null, /* Imports */[ 1 dart_library.library('dart/isolate', null, /* Imports */[
2 "dart_runtime/dart", 2 "dart_runtime/dart",
3 'dart/core', 3 'dart/core',
4 'dart/async' 4 'dart/async'
5 ], /* Lazy imports */[ 5 ], /* Lazy imports */[
6 'dart/_isolate_helper' 6 'dart/_isolate_helper'
7 ], function(exports, dart, core, async, _isolate_helper) { 7 ], function(exports, dart, core, async, _isolate_helper) {
8 'use strict'; 8 'use strict';
9 let dartx = dart.dartx; 9 let dartx = dart.dartx;
10 class Capability extends core.Object { 10 class Capability extends core.Object {
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 get errors() { 140 get errors() {
141 let controller = null; 141 let controller = null;
142 let port = null; 142 let port = null;
143 function handleError(message) { 143 function handleError(message) {
144 let errorDescription = dart.as(dart.dindex(message, 0), core.String); 144 let errorDescription = dart.as(dart.dindex(message, 0), core.String);
145 let stackDescription = dart.as(dart.dindex(message, 1), core.String); 145 let stackDescription = dart.as(dart.dindex(message, 1), core.String);
146 let error = new RemoteError(errorDescription, stackDescription); 146 let error = new RemoteError(errorDescription, stackDescription);
147 controller.addError(error, error.stackTrace); 147 controller.addError(error, error.stackTrace);
148 } 148 }
149 dart.fn(handleError, dart.void, [dart.dynamic]); 149 dart.fn(handleError, dart.void, [dart.dynamic]);
150 controller = async.StreamController.broadcast({sync: true, onListen: dart. fn(() => { 150 controller = async.StreamController.broadcast({sync: true, onListen: dart. fn((() => {
151 port = RawReceivePort.new(handleError); 151 port = RawReceivePort.new(handleError);
152 this.addErrorListener(port.sendPort); 152 this.addErrorListener(port.sendPort);
153 }), onCancel: dart.fn(() => { 153 }).bind(this)), onCancel: dart.fn((() => {
154 this.removeErrorListener(port.sendPort); 154 this.removeErrorListener(port.sendPort);
155 port.close(); 155 port.close();
156 port = null; 156 port = null;
157 })}); 157 }).bind(this))});
158 return controller.stream; 158 return controller.stream;
159 } 159 }
160 } 160 }
161 dart.setSignature(Isolate, { 161 dart.setSignature(Isolate, {
162 constructors: () => ({Isolate: [Isolate, [SendPort], {pauseCapability: Capab ility, terminateCapability: Capability}]}), 162 constructors: () => ({Isolate: [Isolate, [SendPort], {pauseCapability: Capab ility, terminateCapability: Capability}]}),
163 methods: () => ({ 163 methods: () => ({
164 pause: [Capability, [], [Capability]], 164 pause: [Capability, [], [Capability]],
165 [_pause]: [dart.void, [Capability]], 165 [_pause]: [dart.void, [Capability]],
166 resume: [dart.void, [Capability]], 166 resume: [dart.void, [Capability]],
167 addOnExitListener: [dart.void, [SendPort]], 167 addOnExitListener: [dart.void, [SendPort]],
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 }); 256 });
257 // Exports: 257 // Exports:
258 exports.Capability = Capability; 258 exports.Capability = Capability;
259 exports.IsolateSpawnException = IsolateSpawnException; 259 exports.IsolateSpawnException = IsolateSpawnException;
260 exports.Isolate = Isolate; 260 exports.Isolate = Isolate;
261 exports.SendPort = SendPort; 261 exports.SendPort = SendPort;
262 exports.ReceivePort = ReceivePort; 262 exports.ReceivePort = ReceivePort;
263 exports.RawReceivePort = RawReceivePort; 263 exports.RawReceivePort = RawReceivePort;
264 exports.RemoteError = RemoteError; 264 exports.RemoteError = RemoteError;
265 }); 265 });
OLDNEW
« no previous file with comments | « lib/runtime/dart/convert.js ('k') | lib/src/codegen/js_codegen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698