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

Unified Diff: lib/src/util/dart.dart

Issue 2184543002: Use the package_resolver package. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Created 4 years, 5 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 | « lib/src/runner/vm/platform.dart ('k') | lib/src/util/io.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/util/dart.dart
diff --git a/lib/src/util/dart.dart b/lib/src/util/dart.dart
index f6ddff0b4f585b2cab1eee167ddefdfe4523bd53..05cd260a96b92433ba073b65aed9c4a6785de6e5 100644
--- a/lib/src/util/dart.dart
+++ b/lib/src/util/dart.dart
@@ -16,18 +16,13 @@ import 'string_literal_iterator.dart';
/// they will be resolved in the same context as the host isolate. [message] is
/// passed to the [main] method of the code being run; the caller is responsible
/// for using this to establish communication with the isolate.
-///
-/// [packageRoot] controls the package root of the isolate. It may be either a
-/// [String] or a [Uri].
-Future<Isolate> runInIsolate(String code, message, {packageRoot,
- bool checked}) async {
- if (packageRoot is String) packageRoot = Uri.parse(packageRoot);
-
+Future<Isolate> runInIsolate(String code, message, {bool checked}) async {
return await Isolate.spawnUri(
Uri.parse('data:application/dart;charset=utf-8,' + Uri.encodeFull(code)),
[],
message,
- packageRoot: packageRoot,
+ packageRoot: await Isolate.packageRoot,
+ packageConfig: await Isolate.packageConfig,
checked: checked);
}
« no previous file with comments | « lib/src/runner/vm/platform.dart ('k') | lib/src/util/io.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698