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

Unified Diff: runtime/bin/builtin.dart

Issue 10386107: Implement spawnUri from dart:isolate. This function allows us to (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 | « runtime/bin/builtin.cc ('k') | 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
===================================================================
--- runtime/bin/builtin.dart (revision 7714)
+++ runtime/bin/builtin.dart (working copy)
@@ -23,11 +23,6 @@
}
-// Code to deal with URI resolution for the standalone binary.
-// For Windows we need to massage the paths a bit according to
-// http://blogs.msdn.com/b/ie/archive/2006/12/06/file-uris-in-windows.aspx
-var _is_windows;
-
// The URI that the entrypoint script was loaded from. Remembered so that
// package imports can be resolved relative to it.
var _entrypoint;
@@ -48,11 +43,13 @@
_packageRoot = packageRoot;
}
-String _resolveScriptUri(String cwd, String scriptName, bool windows) {
- _is_windows = windows;
+String _resolveScriptUri(String cwd, String scriptName, bool isWindows) {
_logResolution("# Current working directory: $cwd");
_logResolution("# ScriptName: $scriptName");
- if (windows) {
+ if (isWindows) {
+ // For Windows we need to massage the paths a bit according to
+ // http://blogs.msdn.com/b/ie/archive/2006/12/06/file-uris-in-windows.aspx
+ //
// Convert
// C:\one\two\three
// to
@@ -92,7 +89,7 @@
}
-String _filePathFromUri(String userUri) {
+String _filePathFromUri(String userUri, bool isWindows) {
var uri = new Uri.fromString(userUri);
_logResolution("# Getting file path from: $uri");
@@ -113,7 +110,10 @@
throw "Not a known scheme: $uri";
}
- if (_is_windows) {
+ if (isWindows) {
+ // For Windows we need to massage the paths a bit according to
+ // http://blogs.msdn.com/b/ie/archive/2006/12/06/file-uris-in-windows.aspx
+ //
// Drop the leading / before the drive letter.
path = path.substring(1);
_logResolution("# path: $path");
« no previous file with comments | « runtime/bin/builtin.cc ('k') | runtime/bin/dartutils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698