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

Unified Diff: sdk/lib/_internal/js_runtime/lib/isolate_helper.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
« no previous file with comments | « pkg/compiler/lib/src/js_emitter/headers.dart ('k') | sdk/lib/_internal/js_runtime/lib/isolate_patch.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/js_runtime/lib/isolate_helper.dart
diff --git a/sdk/lib/_internal/js_runtime/lib/isolate_helper.dart b/sdk/lib/_internal/js_runtime/lib/isolate_helper.dart
index c181c6da962f281f1358c6798ca3cd856f2a8c92..18da81df1d6d1ad555502b35ec69f4bb68442f7b 100644
--- a/sdk/lib/_internal/js_runtime/lib/isolate_helper.dart
+++ b/sdk/lib/_internal/js_runtime/lib/isolate_helper.dart
@@ -751,6 +751,14 @@ class IsolateNatives {
static String thisScript = computeThisScript();
+ /// Returns the base path added to Uri.base to resolve `package:` Uris.
+ ///
+ /// This is used by `Isolate.resolvePackageUri` to load resources. The default
+ /// value is `packages/` but users can override this by using the
+ /// `defaultPackagesBase` hook.
+ static String get packagesBase =>
+ JS('String', r'self.defaultPackagesBase || "packages/"');
+
/// Associates an ID with a native worker object.
static final Expando<int> workerIds = new Expando<int>();
« no previous file with comments | « pkg/compiler/lib/src/js_emitter/headers.dart ('k') | sdk/lib/_internal/js_runtime/lib/isolate_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698