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

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

Issue 1207313002: initial sync*, part of #221 (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 6 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/runtime/dart/js.js » ('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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 } 133 }
134 removeErrorListener(port) { 134 removeErrorListener(port) {
135 let message = core.List.new(2); 135 let message = core.List.new(2);
136 message[dartx.set](0, "stopErrors"); 136 message[dartx.set](0, "stopErrors");
137 message[dartx.set](1, port); 137 message[dartx.set](1, port);
138 this.controlPort.send(message); 138 this.controlPort.send(message);
139 } 139 }
140 get errors() { 140 get errors() {
141 let controller = null; 141 let controller = null;
142 let port = null; 142 let port = null;
143 let 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 }), 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 })});
158 return controller.stream; 158 return controller.stream;
(...skipping 97 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/core.js ('k') | lib/runtime/dart/js.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698