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

Side by Side Diff: pkg/dev_compiler/lib/js/legacy/dart_library.js

Issue 2965283002: fix libraries getter (Closed)
Patch Set: Created 3 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 /* This file defines the module loader for the dart runtime. 5 /* This file defines the module loader for the dart runtime.
6 */ 6 */
7 var dart_library; 7 var dart_library;
8 if (!dart_library) { 8 if (!dart_library) {
9 dart_library = 9 dart_library =
10 typeof module != "undefined" && module.exports || {}; 10 typeof module != "undefined" && module.exports || {};
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 stub() { 130 stub() {
131 return this._library; 131 return this._library;
132 } 132 }
133 } 133 }
134 LibraryLoader.NOT_LOADED = 0; 134 LibraryLoader.NOT_LOADED = 0;
135 LibraryLoader.LOADING = 1; 135 LibraryLoader.LOADING = 1;
136 LibraryLoader.READY = 2; 136 LibraryLoader.READY = 2;
137 137
138 // Map from name to LibraryLoader 138 // Map from name to LibraryLoader
139 let _libraries = new Map(); 139 let _libraries = new Map();
140 dart_library.libraries = function() { return libraries.keys(); }; 140 dart_library.libraries = function() { return _libraries.keys(); };
141 dart_library.debuggerLibraries = function() { 141 dart_library.debuggerLibraries = function() {
142 var debuggerLibraries = []; 142 var debuggerLibraries = [];
143 _libraries.forEach(function (value, key, map) { 143 _libraries.forEach(function (value, key, map) {
144 debuggerLibraries.push(value.load()); 144 debuggerLibraries.push(value.load());
145 }); 145 });
146 debuggerLibraries.__proto__ = null; 146 debuggerLibraries.__proto__ = null;
147 return debuggerLibraries; 147 return debuggerLibraries;
148 }; 148 };
149 149
150 // Invalidate a library and all things that depend on it 150 // Invalidate a library and all things that depend on it
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 } else { 262 } else {
263 // If not a reload then store the initial html to reset it on reload. 263 // If not a reload then store the initial html to reset it on reload.
264 _originalBody = document.body.cloneNode(true); 264 _originalBody = document.body.cloneNode(true);
265 } 265 }
266 library.main(); 266 library.main();
267 } 267 }
268 dart_library.start = start; 268 dart_library.start = start;
269 269
270 })(dart_library); 270 })(dart_library);
271 } 271 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698