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

Unified Diff: runtime/bin/builtin.dart

Issue 2031103002: Fix canonicalization of --url_mapping URIs in gen_snapshot (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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 | « no previous file | runtime/bin/dartutils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/builtin.dart
diff --git a/runtime/bin/builtin.dart b/runtime/bin/builtin.dart
index 112fa45fe89af41b3b602cf1411876798fbd2b21..8b4c0604840816f85bdd7f62d520019d2b9acf93 100644
--- a/runtime/bin/builtin.dart
+++ b/runtime/bin/builtin.dart
@@ -691,6 +691,29 @@ _loadDataAsync(int tag, String uri, String libraryUri) {
}
+// Embedder Entrypoint:
+// Function called by standalone embedder to resolve uris when the VM requests
+// Dart_kCanonicalizeUrl from the tag handler.
+String _resolveUri(String base, String userString) {
+ if (!_setupCompleted) {
+ _setupHooks();
+ }
+
+ if (_traceLoading) {
+ _log('Resolving: $userString from $base');
+ }
+
+ var baseUri = Uri.parse(base);
+ var result = baseUri.resolve(userString).toString();
+ if (_traceLoading) {
+ _log('Resolved $userString in $base to $result');
+ }
+
+ return result;
+}
+
+
+
// Handling of access to the package root or package map from user code.
_triggerPackageResolution(action) {
if (_packagesReady) {
« no previous file with comments | « no previous file | runtime/bin/dartutils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698