| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 import "dart:async"; | |
| 6 import "dart:isolate"; | |
| 7 | |
| 8 // This type corresponds to the VM-internal class LibraryPrefix. | 5 // This type corresponds to the VM-internal class LibraryPrefix. |
| 9 class _LibraryPrefix { | 6 class _LibraryPrefix { |
| 10 bool _load() native "LibraryPrefix_load"; | 7 bool _load() native "LibraryPrefix_load"; |
| 11 Object _loadError() native "LibraryPrefix_loadError"; | 8 Object _loadError() native "LibraryPrefix_loadError"; |
| 12 bool isLoaded() native "LibraryPrefix_isLoaded"; | 9 bool isLoaded() native "LibraryPrefix_isLoaded"; |
| 13 bool _invalidateDependentCode() | 10 bool _invalidateDependentCode() |
| 14 native "LibraryPrefix_invalidateDependentCode"; | 11 native "LibraryPrefix_invalidateDependentCode"; |
| 15 | 12 |
| 16 loadLibrary() { | 13 loadLibrary() { |
| 17 for (int i = 0; i < _outstandingLoadRequests.length; i++) { | 14 for (int i = 0; i < _outstandingLoadRequests.length; i++) { |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 completer.completeError(error); | 68 completer.completeError(error); |
| 72 } else if (prefix._load()) { | 69 } else if (prefix._load()) { |
| 73 prefix._invalidateDependentCode(); | 70 prefix._invalidateDependentCode(); |
| 74 completer.complete(true); | 71 completer.complete(true); |
| 75 } else { | 72 } else { |
| 76 stillOutstandingLoadRequests.add(outstandingRequests[i]); | 73 stillOutstandingLoadRequests.add(outstandingRequests[i]); |
| 77 } | 74 } |
| 78 } | 75 } |
| 79 _outstandingLoadRequests = stillOutstandingLoadRequests; | 76 _outstandingLoadRequests = stillOutstandingLoadRequests; |
| 80 } | 77 } |
| OLD | NEW |