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

Unified Diff: runtime/bin/builtin.dart

Issue 9694045: Change lookup path for Dart native extensions shared libraries. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: fix isAbsolutePath, remove trailing whitespace. Created 8 years, 9 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/extensions.h » ('j') | runtime/bin/extensions.cc » ('J')
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 b495346bf3aaae0925b368dbfcd23fe5bb82bdee..98bf99a0ce4f96550e63b5e3f16ee7568e988fde 100644
--- a/runtime/bin/builtin.dart
+++ b/runtime/bin/builtin.dart
@@ -65,7 +65,21 @@ String resolveUri(String base, String userString) {
_logResolution("# Resolving: $userString from $base");
var resolved = baseUri.resolve(userString);
_logResolution("# Resolved to: $resolved");
- return resolved.toString();
+ return resolved.toString();
+}
+
+String resolveExtensionUri(String base, String userString) {
+ var uri = new Uri.fromString(userString);
Ivan Posva 2012/03/15 16:18:20 Please add comments why dart-ext URIs need special
Bill Hesse 2012/04/17 14:46:31 This special function has been dropped, and its fu
+ if ("dart-ext" != uri.scheme) {
+ throw "Not a Dart extension uri: $uri";
+ }
+ var schemelessUri = new Uri(path: uri.path);
+ var baseUri = new Uri.fromString(base);
+ _logResolution("# Resolving: $userString from $base");
+ var resolved = baseUri.resolveUri(schemelessUri);
+ resolved = new Uri(scheme: 'dart-ext', path: resolved.path);
+ _logResolution("# Resolved to: $resolved");
+ return resolved.toString();
}
String filePathFromUri(String userUri) {
Ivan Posva 2012/03/15 16:18:20 This function essentially does what you are doing
Bill Hesse 2012/04/17 14:46:31 Yes, and with a refactoring, the existing call of
« no previous file with comments | « no previous file | runtime/bin/extensions.h » ('j') | runtime/bin/extensions.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698