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

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

Issue 2495383003: Add implementation of Isolate.resolvePackageUri for dart2js. (Closed)
Patch Set: cl comments 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..637943b44eacd224c3784d107741c8f1911621fe 100644
--- a/sdk/lib/_internal/js_runtime/lib/isolate_patch.dart
+++ b/sdk/lib/_internal/js_runtime/lib/isolate_patch.dart
@@ -31,9 +31,12 @@ class Isolate {
throw new UnsupportedError("Isolate.packageConfig");
}
+ static Uri _packageBase = Uri.base.resolve(IsolateNatives.packagesBase);
+
@patch
- static Future<Uri> resolvePackageUri(Uri packageUri) {
- throw new UnsupportedError("Isolate.resolvePackageUri");
+ static Future<Uri> resolvePackageUri(Uri packageUri) async {
+ if (packageUri.scheme != 'package') return packageUri;
+ return _packageBase.resolveUri(packageUri.replace(scheme: ''));
}
@patch
« no previous file with comments | « sdk/lib/_internal/js_runtime/lib/isolate_helper.dart ('k') | tests/isolate/browser/package_resolve_browser_hook2_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698