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

Side by Side Diff: runtime/lib/isolate_patch.dart

Issue 1586653003: - Allow specifying of package: URIs for packageConfig and packageRoot when (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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 | « no previous file | tests/isolate/isolate.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import "dart:collection" show HashMap; 5 import "dart:collection" show HashMap;
6 import "dart:_internal"; 6 import "dart:_internal";
7 7
8 patch class ReceivePort { 8 patch class ReceivePort {
9 /* patch */ factory ReceivePort() = _ReceivePortImpl; 9 /* patch */ factory ReceivePort() = _ReceivePortImpl;
10 10
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 // Inherit this isolate's package resolution setup if not overridden. 371 // Inherit this isolate's package resolution setup if not overridden.
372 if (!automaticPackageResolution && 372 if (!automaticPackageResolution &&
373 (packageRoot == null) && 373 (packageRoot == null) &&
374 (packageConfig == null)) { 374 (packageConfig == null)) {
375 if (Isolate._packageSupported()) { 375 if (Isolate._packageSupported()) {
376 packageRoot = await Isolate.packageRoot; 376 packageRoot = await Isolate.packageRoot;
377 packageConfig = await Isolate.packageConfig; 377 packageConfig = await Isolate.packageConfig;
378 } 378 }
379 } 379 }
380 380
381 // Ensure to resolve package: URIs being handed in as parameters.
382 packageRoot = (packageRoot == null) ? null :
383 await Isolate.resolvePackageUri(packageRoot);
384 packageConfig = (packageConfig == null) ? null :
385 await Isolate.resolvePackageUri(packageConfig);
386
381 // The VM will invoke [_startIsolate] and not `main`. 387 // The VM will invoke [_startIsolate] and not `main`.
382 readyPort = new RawReceivePort(); 388 readyPort = new RawReceivePort();
383 var packageRootString = packageRoot?.toString(); 389 var packageRootString = packageRoot?.toString();
384 var packageConfigString = packageConfig?.toString(); 390 var packageConfigString = packageConfig?.toString();
385 391
386 _spawnUri(readyPort.sendPort, spawnedUri.toString(), 392 _spawnUri(readyPort.sendPort, spawnedUri.toString(),
387 args, message, 393 args, message,
388 paused, onExit, onError, 394 paused, onExit, onError,
389 errorsAreFatal, checked, 395 errorsAreFatal, checked,
390 null, /* environment */ 396 null, /* environment */
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 try { 553 try {
548 return Uri.parse(_getCurrentRootUriStr()); 554 return Uri.parse(_getCurrentRootUriStr());
549 } catch (e, s) { 555 } catch (e, s) {
550 return null; 556 return null;
551 } 557 }
552 } 558 }
553 559
554 static String _getCurrentRootUriStr() 560 static String _getCurrentRootUriStr()
555 native "Isolate_getCurrentRootUriStr"; 561 native "Isolate_getCurrentRootUriStr";
556 } 562 }
OLDNEW
« no previous file with comments | « no previous file | tests/isolate/isolate.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698