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

Side by Side Diff: lib/runtime/dart_library.js

Issue 2208533003: Get rid of library proto information for debugger libraries (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Deletion of library name caching Created 4 years, 4 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 | lib/runtime/dart_sdk.js » ('j') | 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 7
8 var dart_library = 8 var dart_library =
9 typeof module != "undefined" && module.exports || {}; 9 typeof module != "undefined" && module.exports || {};
10 10
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 LibraryLoader.READY = 2; 77 LibraryLoader.READY = 2;
78 78
79 // Map from name to LibraryLoader 79 // Map from name to LibraryLoader
80 let libraries = new Map(); 80 let libraries = new Map();
81 dart_library.libraries = function() { return libraries.keys(); }; 81 dart_library.libraries = function() { return libraries.keys(); };
82 dart_library.debuggerLibraries = function() { 82 dart_library.debuggerLibraries = function() {
83 var debuggerLibraries = []; 83 var debuggerLibraries = [];
84 libraries.forEach(function (value, key, map) { 84 libraries.forEach(function (value, key, map) {
85 debuggerLibraries.push(value.load()); 85 debuggerLibraries.push(value.load());
86 }); 86 });
87 debuggerLibraries.__proto__ = null;
87 return debuggerLibraries; 88 return debuggerLibraries;
88 }; 89 };
89 90
90 function library(name, defaultValue, imports, loader) { 91 function library(name, defaultValue, imports, loader) {
91 let result = new LibraryLoader(name, defaultValue, imports, loader); 92 let result = new LibraryLoader(name, defaultValue, imports, loader);
92 libraries.set(name, result); 93 libraries.set(name, result);
93 return result; 94 return result;
94 } 95 }
95 dart_library.library = library; 96 dart_library.library = library;
96 97
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 window.SourceBufferList = new MediaSource().sourceBuffers.constructor; 155 window.SourceBufferList = new MediaSource().sourceBuffers.constructor;
155 } 156 }
156 } 157 }
157 158
158 // This import is only needed for chrome debugging. We should provide an 159 // This import is only needed for chrome debugging. We should provide an
159 // option to compile without it. 160 // option to compile without it.
160 dart_sdk._debugger.registerDevtoolsFormatter(); 161 dart_sdk._debugger.registerDevtoolsFormatter();
161 } 162 }
162 163
163 })(dart_library); 164 })(dart_library);
OLDNEW
« no previous file with comments | « no previous file | lib/runtime/dart_sdk.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698