Chromium Code Reviews| Index: runtime/bin/builtin.dart |
| diff --git a/runtime/bin/builtin.dart b/runtime/bin/builtin.dart |
| index bae69527f905400553e6dd8622aafff93e491f8c..ecabda40fc2f380853c7582801548240497c49e8 100644 |
| --- a/runtime/bin/builtin.dart |
| +++ b/runtime/bin/builtin.dart |
| @@ -36,6 +36,12 @@ _setPackageRoot(String packageRoot) { |
| } |
| String _resolveScriptUri(String cwd, String scriptName, bool isWindows) { |
| + var scriptUri = Uri.parse(scriptName); |
| + if (scriptUri.scheme == 'http') { |
| + _entrypoint = scriptUri; |
| + _logResolution("# Resolved script to: $_entrypoint"); |
| + return _entrypoint.toString(); |
| + } |
| _logResolution("# Current working directory: $cwd"); |
| _logResolution("# ScriptName: $scriptName"); |
| if (isWindows) { |
| @@ -159,7 +165,11 @@ String _filePathFromPackageUri(Uri uri) { |
| if (_packageRoot != null) { |
| path = "${_packageRoot}${uri.path}"; |
| } else { |
| - path = _entrypoint.resolve('packages/${uri.path}').path; |
| + if (_entrypoint.scheme == 'http') { |
| + path = _entrypoint.resolve('packages/${uri.path}').toString(); |
| + } else { |
| + path = _entrypoint.resolve('packages/${uri.path}').path; |
| + } |
| } |
| _logResolution("# Package: $path"); |
| @@ -176,9 +186,9 @@ String _pathFromHttpUri(String userUri) { |
| return uri.path; |
| } |
| -String _domainFromHttpUri(String userUri) { |
| +String _hostFromHttpUri(String userUri) { |
| var uri = Uri.parse(userUri); |
| - return uri.domain; |
| + return uri.host; |
|
Søren Gjesse
2013/05/30 09:13:03
Sorry I missed this when landing the Uri change.
|
| } |
| int _portFromHttpUri(String userUri) { |