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:async'; | 7 import 'dart:async'; |
8 import 'dart:collection'; | 8 import 'dart:collection'; |
9 import 'dart:_internal'; | 9 import 'dart:_internal'; |
10 import 'dart:isolate'; | 10 import 'dart:isolate'; |
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
521 | 521 |
522 | 522 |
523 void _asyncLoadError(_LoadRequest req, _LoadError error, StackTrace stack) { | 523 void _asyncLoadError(_LoadRequest req, _LoadError error, StackTrace stack) { |
524 if (_traceLoading) { | 524 if (_traceLoading) { |
525 _log("_asyncLoadError(${req._uri}), error: $error\nstack: $stack"); | 525 _log("_asyncLoadError(${req._uri}), error: $error\nstack: $stack"); |
526 } | 526 } |
527 if (req._tag == _Dart_kResourceLoad) { | 527 if (req._tag == _Dart_kResourceLoad) { |
528 Completer c = req._context; | 528 Completer c = req._context; |
529 c.completeError(error, stack); | 529 c.completeError(error, stack); |
530 } else { | 530 } else { |
531 Uri libraryUri = req._context; | 531 String libraryUri = req._context; |
532 if (req._tag == _Dart_kImportTag) { | 532 if (req._tag == _Dart_kImportTag) { |
533 // When importing a library, the libraryUri is the imported | 533 // When importing a library, the libraryUri is the imported |
534 // uri. | 534 // uri. |
535 libraryUri = req._uri; | 535 libraryUri = req._uri; |
536 } | 536 } |
537 _asyncLoadErrorCallback(req._uri, libraryUri, error); | 537 _asyncLoadErrorCallback(req._uri, libraryUri, error); |
538 } | 538 } |
539 _finishLoadRequest(req); | 539 _finishLoadRequest(req); |
540 } | 540 } |
541 | 541 |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
752 | 752 |
753 return [path, filename, name]; | 753 return [path, filename, name]; |
754 } | 754 } |
755 | 755 |
756 | 756 |
757 // Register callbacks and hooks with the rest of the core libraries. | 757 // Register callbacks and hooks with the rest of the core libraries. |
758 _setupHooks() { | 758 _setupHooks() { |
759 _setupCompleted = true; | 759 _setupCompleted = true; |
760 VMLibraryHooks.resourceReadAsBytes = _resourceReadAsBytes; | 760 VMLibraryHooks.resourceReadAsBytes = _resourceReadAsBytes; |
761 } | 761 } |
OLD | NEW |