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

Side by Side Diff: sdk/lib/async/deferred_load.dart

Issue 221663005: Load deferred chunks in the right order. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 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
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 part of dart.async; 5 part of dart.async;
6 6
7 /** 7 /**
8 * Indicates that loading of [libraryName] is deferred. 8 * Indicates that loading of [libraryName] is deferred.
9 * 9 *
10 * Applies to library imports, when used as metadata. 10 * Applies to library imports, when used as metadata.
(...skipping 16 matching lines...) Expand all
27 */ 27 */
28 class DeferredLibrary { 28 class DeferredLibrary {
29 final String libraryName; 29 final String libraryName;
30 final String uri; 30 final String uri;
31 31
32 const DeferredLibrary(this.libraryName, {this.uri}); 32 const DeferredLibrary(this.libraryName, {this.uri});
33 33
34 /** 34 /**
35 * Ensure that [libraryName] has been loaded. 35 * Ensure that [libraryName] has been loaded.
36 * 36 *
37 * The value of the returned future is true if this invocation of
38 * [load] caused the library to be loaded.
39 *
40 * If the library fails to load, the Future will complete with a 37 * If the library fails to load, the Future will complete with a
41 * DeferredLoadException. 38 * DeferredLoadException.
42 */ 39 */
43 external Future<bool> load(); 40 external Future<Null> load();
44 } 41 }
45 42
46 /** 43 /**
47 * Thrown when a deferred library fails to load. 44 * Thrown when a deferred library fails to load.
48 */ 45 */
49 class DeferredLoadException implements Exception { 46 class DeferredLoadException implements Exception {
50 DeferredLoadException(String this._s); 47 DeferredLoadException(String this._s);
51 String toString() => "DeferredLoadException: '$_s'"; 48 String toString() => "DeferredLoadException: '$_s'";
52 final String _s; 49 final String _s;
53 } 50 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/lib/js_helper.dart ('k') | tests/compiler/dart2js/deferred_load_graph_segmentation_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698