Chromium Code Reviews| Index: lib/runtime/dart_library.js |
| diff --git a/lib/runtime/dart_library.js b/lib/runtime/dart_library.js |
| index 0b6dd36a1ffd65f9c11f63ec6f53ee7314d0b5d3..906929584dab38e591cbe0d404b7806f4843f285 100644 |
| --- a/lib/runtime/dart_library.js |
| +++ b/lib/runtime/dart_library.js |
| @@ -16,6 +16,8 @@ var dart_library = |
| throw Error(message); |
| } |
| + const dartLibraryName = Symbol("dartLibraryName"); |
|
bmilligan
2016/07/21 01:59:27
John - Not sure where this Symbol should go.
|
| + |
| // Module support. This is a simplified module system for Dart. |
| // Longer term, we can easily migrate to an existing JS module system: |
| // ES6, AMD, RequireJS, .... |
| @@ -60,7 +62,7 @@ var dart_library = |
| args.unshift(this._library); |
| this._loader.apply(null, args); |
| this._state = LibraryLoader.READY; |
| - this._library._name = this._name; |
| + this._library[dartLibraryName] = this._name; |
| return this._library; |
| } |
| @@ -75,6 +77,13 @@ var dart_library = |
| // Map from name to LibraryLoader |
| let libraries = new Map(); |
| dart_library.libraries = function() { return libraries.keys(); }; |
| + dart_library.debuggerLibraries = function() { |
| + var debuggerLibraries = []; |
| + libraries.forEach(function (value, key, map) { |
| + debuggerLibraries.push(value.load()); |
| + }); |
| + return debuggerLibraries; |
| + }; |
| function library(name, defaultValue, imports, loader) { |
| let result = new LibraryLoader(name, defaultValue, imports, loader); |