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

Unified Diff: runtime/lib/isolate_patch.dart

Issue 1403693002: - Implement package map parameter when spawning isolate. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address review comments. Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/lib/isolate.cc ('k') | runtime/vm/dart_api_impl_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/isolate_patch.dart
diff --git a/runtime/lib/isolate_patch.dart b/runtime/lib/isolate_patch.dart
index 9e77fa43bb7e9d3228b06e2d897b9edc9cc2deb2..6d59fff5567134197256968651e777d65523b83c 100644
--- a/runtime/lib/isolate_patch.dart
+++ b/runtime/lib/isolate_patch.dart
@@ -334,14 +334,20 @@ patch class Isolate {
Map<String, Uri> packageMap}) {
RawReceivePort readyPort;
if (environment != null) throw new UnimplementedError("environment");
- if (packageMap != null) throw new UnimplementedError("packageMap");
try {
// The VM will invoke [_startIsolate] and not `main`.
- // TODO: Handle [packagesMap].
readyPort = new RawReceivePort();
var packageRootString =
(packageRoot == null) ? null : packageRoot.toString();
var packagesList = null;
+ if (packageMap != null) {
+ packagesList = new List(2 * packageMap.length);
+ var i = 0;
+ packageMap.forEach((key, value) {
+ packagesList[i++] = key;
+ packagesList[i++] = Uri.base.resolveUri(value).toString();
+ });
+ }
_spawnUri(readyPort.sendPort, uri.toString(),
args, message,
« no previous file with comments | « runtime/lib/isolate.cc ('k') | runtime/vm/dart_api_impl_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698