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

Unified Diff: sdk/lib/_internal/js_runtime/lib/isolate_patch.dart

Issue 2495383003: Add implementation of Isolate.resolvePackageUri for dart2js. (Closed)
Patch Set: Created 4 years, 1 month 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: sdk/lib/_internal/js_runtime/lib/isolate_patch.dart
diff --git a/sdk/lib/_internal/js_runtime/lib/isolate_patch.dart b/sdk/lib/_internal/js_runtime/lib/isolate_patch.dart
index ed72e6c09fa64493de08b5803cab910249f3cedf..8ba178d5fb62ff6729643bf55c56006b86df9453 100644
--- a/sdk/lib/_internal/js_runtime/lib/isolate_patch.dart
+++ b/sdk/lib/_internal/js_runtime/lib/isolate_patch.dart
@@ -32,8 +32,9 @@ class Isolate {
}
@patch
- static Future<Uri> resolvePackageUri(Uri packageUri) {
- throw new UnsupportedError("Isolate.resolvePackageUri");
+ static Future<Uri> resolvePackageUri(Uri packageUri) async {
+ var base = IsolateNatives.packagesBase;
+ return Uri.base.resolve('$base/${packageUri.path}');
Lasse Reichstein Nielsen 2016/11/14 20:42:34 There is no validation of the packageUri. If the a
Lasse Reichstein Nielsen 2016/11/14 20:46:23 Actually, it can probably just be: Uri.base.reso
Siggi Cherem (dart-lang) 2016/11/14 23:07:15 Done. I'm checking for the package scheme first, t
Siggi Cherem (dart-lang) 2016/11/14 23:07:15 Done.
}
@patch

Powered by Google App Engine
This is Rietveld 408576698