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

Unified Diff: sdk/lib/_internal/js_runtime/lib/isolate_helper.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_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..52ea00fde9edc9cac4980e618633a4eab3ad9ace 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 indirectly used by `package:resource` to load resources. The
Lasse Reichstein Nielsen 2016/11/14 20:42:34 Maybe refer to Isolate.resolvePackageUri, which is
Siggi Cherem (dart-lang) 2016/11/14 23:07:14 Done.
+ /// 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>();

Powered by Google App Engine
This is Rietveld 408576698