OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 part of vmservice_io; | 5 part of vmservice_io; |
6 | 6 |
7 _sanitizeWindowsPath(path) { | 7 _sanitizeWindowsPath(path) { |
8 // For Windows we need to massage the paths a bit according to | 8 // For Windows we need to massage the paths a bit according to |
9 // http://blogs.msdn.com/b/ie/archive/2006/12/06/file-uris-in-windows.aspx | 9 // http://blogs.msdn.com/b/ie/archive/2006/12/06/file-uris-in-windows.aspx |
10 // | 10 // |
(...skipping 1102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1113 default: | 1113 default: |
1114 if (traceLoading) { | 1114 if (traceLoading) { |
1115 _log('Unknown scheme (${pathUri.scheme}) in $pathUri.'); | 1115 _log('Unknown scheme (${pathUri.scheme}) in $pathUri.'); |
1116 } | 1116 } |
1117 _sendExtensionImportResponse(sp, uri, libraryUri, null); | 1117 _sendExtensionImportResponse(sp, uri, libraryUri, null); |
1118 break; | 1118 break; |
1119 } | 1119 } |
1120 break; | 1120 break; |
1121 case _Dart_kResolveAsFilePath: | 1121 case _Dart_kResolveAsFilePath: |
1122 String uri = request[4]; | 1122 String uri = request[4]; |
1123 Uri resolvedUri = Uri.parse(uri); | 1123 Uri resolvedUri = Uri.parse(_sanitizeWindowsPath(uri)); |
1124 try { | 1124 try { |
1125 if (resolvedUri.scheme == 'package') { | 1125 if (resolvedUri.scheme == 'package') { |
1126 resolvedUri = loaderState._resolvePackageUri(resolvedUri); | 1126 resolvedUri = loaderState._resolvePackageUri(resolvedUri); |
1127 } | 1127 } |
1128 if (resolvedUri.scheme == '' || resolvedUri.scheme == 'file') { | 1128 if (resolvedUri.scheme == '' || resolvedUri.scheme == 'file') { |
1129 resolvedUri = loaderState._workingDirectory.resolveUri(resolvedUri); | 1129 resolvedUri = loaderState._workingDirectory.resolveUri(resolvedUri); |
1130 var msg = new List(5); | 1130 var msg = new List(5); |
1131 msg[0] = tag; | 1131 msg[0] = tag; |
1132 msg[1] = uri; | 1132 msg[1] = uri; |
1133 msg[2] = resolvedUri.toString(); | 1133 msg[2] = resolvedUri.toString(); |
(...skipping 11 matching lines...) Expand all Loading... |
1145 msg[2] = resolvedUri.toString(); | 1145 msg[2] = resolvedUri.toString(); |
1146 msg[3] = null; | 1146 msg[3] = null; |
1147 msg[4] = e.toString(); | 1147 msg[4] = e.toString(); |
1148 sp.send(msg); | 1148 sp.send(msg); |
1149 } | 1149 } |
1150 break; | 1150 break; |
1151 default: | 1151 default: |
1152 _log('Unknown loader request tag=$tag from $isolateId'); | 1152 _log('Unknown loader request tag=$tag from $isolateId'); |
1153 } | 1153 } |
1154 } | 1154 } |
OLD | NEW |