| 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 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 "${_pendingPackageLoads.length} packages pending."); | 389 "${_pendingPackageLoads.length} packages pending."); |
| 390 } | 390 } |
| 391 } | 391 } |
| 392 | 392 |
| 393 | 393 |
| 394 RawReceivePort _packagesPort; | 394 RawReceivePort _packagesPort; |
| 395 | 395 |
| 396 void _handlePackagesReply(msg) { | 396 void _handlePackagesReply(msg) { |
| 397 // Make sure to close the _packagePort before any other action. | 397 // Make sure to close the _packagePort before any other action. |
| 398 _packagesPort.close(); | 398 _packagesPort.close(); |
| 399 _packagesPort = null; |
| 399 | 400 |
| 400 if (_traceLoading) { | 401 if (_traceLoading) { |
| 401 _log("Got packages reply: $msg"); | 402 _log("Got packages reply: $msg"); |
| 402 } | 403 } |
| 403 if (msg is String) { | 404 if (msg is String) { |
| 404 if (_traceLoading) { | 405 if (_traceLoading) { |
| 405 _log("Got failure response on package port: '$msg'"); | 406 _log("Got failure response on package port: '$msg'"); |
| 406 } | 407 } |
| 407 throw msg; | 408 throw msg; |
| 408 } | 409 } |
| (...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 827 } | 828 } |
| 828 | 829 |
| 829 | 830 |
| 830 // Register callbacks and hooks with the rest of the core libraries. | 831 // Register callbacks and hooks with the rest of the core libraries. |
| 831 _setupHooks() { | 832 _setupHooks() { |
| 832 _setupCompleted = true; | 833 _setupCompleted = true; |
| 833 VMLibraryHooks.resourceReadAsBytes = _resourceReadAsBytes; | 834 VMLibraryHooks.resourceReadAsBytes = _resourceReadAsBytes; |
| 834 VMLibraryHooks.getPackageRoot = _getPackageRoot; | 835 VMLibraryHooks.getPackageRoot = _getPackageRoot; |
| 835 VMLibraryHooks.getPackageMap = _getPackageMap; | 836 VMLibraryHooks.getPackageMap = _getPackageMap; |
| 836 } | 837 } |
| OLD | NEW |