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

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

Issue 1643523008: fix #43, remove => workaround (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 10 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/html_common.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', 2 'dart/_runtime',
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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 get errors() { 135 get errors() {
136 let controller = null; 136 let controller = null;
137 let port = null; 137 let port = null;
138 function handleError(message) { 138 function handleError(message) {
139 let errorDescription = dart.as(dart.dindex(message, 0), core.String); 139 let errorDescription = dart.as(dart.dindex(message, 0), core.String);
140 let stackDescription = dart.as(dart.dindex(message, 1), core.String); 140 let stackDescription = dart.as(dart.dindex(message, 1), core.String);
141 let error = new RemoteError(errorDescription, stackDescription); 141 let error = new RemoteError(errorDescription, stackDescription);
142 controller.addError(error, error.stackTrace); 142 controller.addError(error, error.stackTrace);
143 } 143 }
144 dart.fn(handleError, dart.void, [dart.dynamic]); 144 dart.fn(handleError, dart.void, [dart.dynamic]);
145 controller = async.StreamController.broadcast({sync: true, onListen: dart. fn((() => { 145 controller = async.StreamController.broadcast({sync: true, onListen: dart. fn(() => {
146 port = RawReceivePort.new(handleError); 146 port = RawReceivePort.new(handleError);
147 this.addErrorListener(port.sendPort); 147 this.addErrorListener(port.sendPort);
148 }).bind(this), dart.void, []), onCancel: dart.fn((() => { 148 }, dart.void, []), onCancel: dart.fn(() => {
149 this.removeErrorListener(port.sendPort); 149 this.removeErrorListener(port.sendPort);
150 port.close(); 150 port.close();
151 port = null; 151 port = null;
152 }).bind(this), dart.void, [])}); 152 }, dart.void, [])});
153 return controller.stream; 153 return controller.stream;
154 } 154 }
155 } 155 }
156 dart.setSignature(Isolate, { 156 dart.setSignature(Isolate, {
157 constructors: () => ({Isolate: [Isolate, [SendPort], {pauseCapability: Capab ility, terminateCapability: Capability}]}), 157 constructors: () => ({Isolate: [Isolate, [SendPort], {pauseCapability: Capab ility, terminateCapability: Capability}]}),
158 methods: () => ({ 158 methods: () => ({
159 pause: [Capability, [], [Capability]], 159 pause: [Capability, [], [Capability]],
160 [_pause]: [dart.void, [Capability]], 160 [_pause]: [dart.void, [Capability]],
161 resume: [dart.void, [Capability]], 161 resume: [dart.void, [Capability]],
162 addOnExitListener: [dart.void, [SendPort]], 162 addOnExitListener: [dart.void, [SendPort]],
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 }); 250 });
251 // Exports: 251 // Exports:
252 exports.Capability = Capability; 252 exports.Capability = Capability;
253 exports.IsolateSpawnException = IsolateSpawnException; 253 exports.IsolateSpawnException = IsolateSpawnException;
254 exports.Isolate = Isolate; 254 exports.Isolate = Isolate;
255 exports.SendPort = SendPort; 255 exports.SendPort = SendPort;
256 exports.ReceivePort = ReceivePort; 256 exports.ReceivePort = ReceivePort;
257 exports.RawReceivePort = RawReceivePort; 257 exports.RawReceivePort = RawReceivePort;
258 exports.RemoteError = RemoteError; 258 exports.RemoteError = RemoteError;
259 }); 259 });
OLDNEW
« no previous file with comments | « lib/runtime/dart/html_common.js ('k') | lib/src/codegen/js_codegen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698