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

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

Issue 1178523004: fixes #215, removes special case for length (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
OLDNEW
1 dart.library('dart/isolate', null, /* Imports */[ 1 dart.library('dart/isolate', null, /* Imports */[
2 'dart/core', 2 'dart/core',
3 'dart/async' 3 'dart/async'
4 ], /* Lazy imports */[ 4 ], /* Lazy imports */[
5 'dart/_isolate_helper' 5 'dart/_isolate_helper'
6 ], function(exports, core, async, _isolate_helper) { 6 ], function(exports, core, async, _isolate_helper) {
7 'use strict'; 7 'use strict';
8 class Capability extends core.Object { 8 class Capability extends core.Object {
9 static new() { 9 static new() {
10 return new _isolate_helper.CapabilityImpl(); 10 return new _isolate_helper.CapabilityImpl();
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 } 47 }
48 48
49 } 49 }
50 static spawnUri(uri, args, message, opts) { 50 static spawnUri(uri, args, message, opts) {
51 let paused = opts && 'paused' in opts ? opts.paused : false; 51 let paused = opts && 'paused' in opts ? opts.paused : false;
52 let packageRoot = opts && 'packageRoot' in opts ? opts.packageRoot : null; 52 let packageRoot = opts && 'packageRoot' in opts ? opts.packageRoot : null;
53 if (packageRoot != null) 53 if (packageRoot != null)
54 throw new core.UnimplementedError("packageRoot"); 54 throw new core.UnimplementedError("packageRoot");
55 try { 55 try {
56 if (dart.is(args, core.List)) { 56 if (dart.is(args, core.List)) {
57 for (let i = 0; dart.notNull(i) < dart.notNull(args.length); i = dart. notNull(i) + 1) { 57 for (let i = 0; dart.notNull(i) < dart.notNull(args[dartx.length]); i = dart.notNull(i) + 1) {
58 if (!(typeof args[dartx.get](i) == 'string')) { 58 if (!(typeof args[dartx.get](i) == 'string')) {
59 throw new core.ArgumentError(`Args must be a list of Strings ${arg s}`); 59 throw new core.ArgumentError(`Args must be a list of Strings ${arg s}`);
60 } 60 }
61 } 61 }
62 } else if (args != null) { 62 } else if (args != null) {
63 throw new core.ArgumentError(`Args must be a list of Strings ${args}`) ; 63 throw new core.ArgumentError(`Args must be a list of Strings ${args}`) ;
64 } 64 }
65 return dart.as(_isolate_helper.IsolateNatives.spawnUri(uri, args, messag e, paused).then(dart.fn(msg => new Isolate(dart.as(dart.dindex(msg, 1), SendPort ), {pauseCapability: dart.as(dart.dindex(msg, 2), Capability), terminateCapabili ty: dart.as(dart.dindex(msg, 3), Capability)}), Isolate, [core.Object])), async. Future$(Isolate)); 65 return dart.as(_isolate_helper.IsolateNatives.spawnUri(uri, args, messag e, paused).then(dart.fn(msg => new Isolate(dart.as(dart.dindex(msg, 1), SendPort ), {pauseCapability: dart.as(dart.dindex(msg, 2), Capability), terminateCapabili ty: dart.as(dart.dindex(msg, 3), Capability)}), Isolate, [core.Object])), async. Future$(Isolate));
66 } catch (e) { 66 } catch (e) {
67 let st = dart.stackTrace(e); 67 let st = dart.stackTrace(e);
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 }); 254 });
255 // Exports: 255 // Exports:
256 exports.Capability = Capability; 256 exports.Capability = Capability;
257 exports.IsolateSpawnException = IsolateSpawnException; 257 exports.IsolateSpawnException = IsolateSpawnException;
258 exports.Isolate = Isolate; 258 exports.Isolate = Isolate;
259 exports.SendPort = SendPort; 259 exports.SendPort = SendPort;
260 exports.ReceivePort = ReceivePort; 260 exports.ReceivePort = ReceivePort;
261 exports.RawReceivePort = RawReceivePort; 261 exports.RawReceivePort = RawReceivePort;
262 exports.RemoteError = RemoteError; 262 exports.RemoteError = RemoteError;
263 }); 263 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698