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

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: Fix typo in comment. 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
Index: runtime/lib/isolate_patch.dart
diff --git a/runtime/lib/isolate_patch.dart b/runtime/lib/isolate_patch.dart
index 9970d921c7557e7fc54d21e0e007960db98b4bab..a0f4196ed733bed251e3bdc47673b4487ff207e1 100644
--- a/runtime/lib/isolate_patch.dart
+++ b/runtime/lib/isolate_patch.dart
@@ -334,14 +334,20 @@ patch class Isolate {
Map<String, Uri> packages}) {
RawReceivePort readyPort;
if (environment != null) throw new UnimplementedError("environment");
- if (packages != null) throw new UnimplementedError("packages");
try {
// The VM will invoke [_startIsolate] and not `main`.
- // TODO: Handle [packages].
readyPort = new RawReceivePort();
var packageRootString =
(packageRoot == null) ? null : packageRoot.toString();
var packagesList = null;
+ if (packages != null) {
+ packagesList = new List(2 * packages.length);
+ var i = 0;
+ packages.forEach((key, value) {
+ packagesList[i++] = key;
+ packagesList[i++] = Uri.base.resolveUri(value).toString();
+ });
+ }
_spawnUri(readyPort.sendPort, uri.toString(),
args, message,

Powered by Google App Engine
This is Rietveld 408576698