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

Side by Side Diff: runtime/bin/builtin.dart

Issue 333283002: Another case of the VM getting a path into Uri.parse. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Another fix. It shows that I don't understand the code I'm fixing! Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 library builtin; 5 library builtin;
6 import 'dart:io'; 6 import 'dart:io';
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:convert'; 8 import 'dart:convert';
9 // import 'root_library'; happens here from C Code 9 // import 'root_library'; happens here from C Code
10 10
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 "${_numOutstandingLoadRequests} requests remaining"); 355 "${_numOutstandingLoadRequests} requests remaining");
356 if (_numOutstandingLoadRequests == 0) { 356 if (_numOutstandingLoadRequests == 0) {
357 _signalDoneLoading(); 357 _signalDoneLoading();
358 } 358 }
359 } 359 }
360 360
361 361
362 // Asynchronously loads source code through an http or file uri. 362 // Asynchronously loads source code through an http or file uri.
363 _loadSourceAsync(int tag, String uri, String libraryUri) { 363 _loadSourceAsync(int tag, String uri, String libraryUri) {
364 var filePath = _filePathFromUri(uri); 364 var filePath = _filePathFromUri(uri);
365 Uri sourceUri = new Uri.file(filePath); 365 Uri sourceUri = _uriFromPathOrUri(filePath);
366 _numOutstandingLoadRequests++; 366 _numOutstandingLoadRequests++;
367 _logResolution("_loadLibrarySource($uri), " 367 _logResolution("_loadLibrarySource($uri), "
368 "${_numOutstandingLoadRequests} requests outstanding"); 368 "${_numOutstandingLoadRequests} requests outstanding");
369 if (sourceUri.scheme == 'http') { 369 if (sourceUri.scheme == 'http') {
370 _httpGet(sourceUri, (data) { 370 _httpGet(sourceUri, (data) {
371 var text = UTF8.decode(data); 371 var text = UTF8.decode(data);
372 _loadLibrarySource(tag, uri, libraryUri, text); 372 _loadLibrarySource(tag, uri, libraryUri, text);
373 }); 373 });
374 } else { 374 } else {
375 var sourceFile = new File(filePath); 375 var sourceFile = new File(filePath);
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 } else if (Platform.isWindows) { 421 } else if (Platform.isWindows) {
422 filename = '$name.dll'; 422 filename = '$name.dll';
423 } else { 423 } else {
424 _logResolution( 424 _logResolution(
425 'Native extensions not supported on ${Platform.operatingSystem}'); 425 'Native extensions not supported on ${Platform.operatingSystem}');
426 throw 'Native extensions not supported on ${Platform.operatingSystem}'; 426 throw 'Native extensions not supported on ${Platform.operatingSystem}';
427 } 427 }
428 428
429 return [path, filename, name]; 429 return [path, filename, name];
430 } 430 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698