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

Unified Diff: lib/runtime/dart_library.js

Issue 2164763005: Library custom formatters (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | lib/runtime/dart_sdk.js » ('j') | test/codegen_expected/path/path.js » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | lib/runtime/dart_sdk.js » ('j') | test/codegen_expected/path/path.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698