| OLD | NEW |
| 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 // NOTE: Do not import 'dart:io' in builtin. | 6 // NOTE: Do not import 'dart:io' in builtin. |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 import 'dart:isolate'; | 8 import 'dart:isolate'; |
| 9 import 'dart:typed_data'; | 9 import 'dart:typed_data'; |
| 10 | 10 |
| (...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 // the number of requests remains out of sync. | 331 // the number of requests remains out of sync. |
| 332 _loadScriptCallback(req._tag, req._uri, req._libraryUri, data); | 332 _loadScriptCallback(req._tag, req._uri, req._libraryUri, data); |
| 333 _finishLoadRequest(req); | 333 _finishLoadRequest(req); |
| 334 } | 334 } |
| 335 | 335 |
| 336 | 336 |
| 337 void _asyncLoadError(_LoadRequest req, _LoadError error) { | 337 void _asyncLoadError(_LoadRequest req, _LoadError error) { |
| 338 if (_traceLoading) { | 338 if (_traceLoading) { |
| 339 _print("_asyncLoadError(${req._uri}), error: $error"); | 339 _print("_asyncLoadError(${req._uri}), error: $error"); |
| 340 } | 340 } |
| 341 var libraryUri = req._libraryUri; |
| 341 if (req._tag == Dart_kImportTag) { | 342 if (req._tag == Dart_kImportTag) { |
| 342 // When importing a library, the libraryUri is the imported | 343 // When importing a library, the libraryUri is the imported |
| 343 // uri. | 344 // uri. |
| 344 req._libraryUri = req._uri; | 345 libraryUri = req._uri; |
| 345 } | 346 } |
| 346 _asyncLoadErrorCallback(req._uri, req._libraryUri, error); | 347 _asyncLoadErrorCallback(req._uri, libraryUri, error); |
| 347 _finishLoadRequest(req); | 348 _finishLoadRequest(req); |
| 348 } | 349 } |
| 349 | 350 |
| 350 | 351 |
| 351 _loadDataFromLoadPort(int tag, | 352 _loadDataFromLoadPort(int tag, |
| 352 String uri, | 353 String uri, |
| 353 String libraryUri, | 354 String libraryUri, |
| 354 Uri resourceUri) { | 355 Uri resourceUri) { |
| 355 try { | 356 try { |
| 356 _startLoadRequest(tag, uri, libraryUri, resourceUri); | 357 _startLoadRequest(tag, uri, libraryUri, resourceUri); |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 505 } else { | 506 } else { |
| 506 name = userUri.substring(index + 1); | 507 name = userUri.substring(index + 1); |
| 507 path = userUri.substring(0, index + 1); | 508 path = userUri.substring(0, index + 1); |
| 508 } | 509 } |
| 509 | 510 |
| 510 path = _filePathFromUri(path); | 511 path = _filePathFromUri(path); |
| 511 var filename = _platformExtensionFileName(name); | 512 var filename = _platformExtensionFileName(name); |
| 512 | 513 |
| 513 return [path, filename, name]; | 514 return [path, filename, name]; |
| 514 } | 515 } |
| OLD | NEW |