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

Unified Diff: lib/runtime/dart_sdk.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:
Download patch
« no previous file with comments | « lib/runtime/dart_library.js ('k') | tool/input_sdk/private/debugger.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/runtime/dart_sdk.js
diff --git a/lib/runtime/dart_sdk.js b/lib/runtime/dart_sdk.js
index 65001f21d9a2a307ea4665fa61bb12f3f38b0a61..6d9d4aa9350909b2912bbcc0076bf46939cab3ec 100644
--- a/lib/runtime/dart_sdk.js
+++ b/lib/runtime/dart_sdk.js
@@ -2818,22 +2818,18 @@ dart_library.library('dart_sdk', null, /* Imports */[
set _customNames(_) {}
});
_debugger.LibraryModuleFormatter = class LibraryModuleFormatter extends core.Object {
- new() {
- this.libraryName = null;
- }
accept(object, config) {
- this.libraryName = core.String._check(dart.getDartLibraryName(object));
- return this.libraryName != null;
+ return dart.getDartLibraryName(object) != null;
}
hasChildren(object) {
return true;
}
preview(object) {
- let libraryNames = this.libraryName[dartx.split]('/');
- if (dart.notNull(libraryNames[dartx.length]) > 1) {
- libraryNames[dartx.set](dart.notNull(libraryNames[dartx.length]) - 1, '');
+ let libraryNames = dart.dsend(dart.getDartLibraryName(object), 'split', '/');
+ if (dart.test(dart.dsend(dart.dload(libraryNames, 'length'), '>', 1))) {
+ dart.dsetindex(libraryNames, dart.dsend(dart.dload(libraryNames, 'length'), '-', 1), '');
}
- return dart.str`Library Module: ${libraryNames[dartx.join]('/')}`;
+ return dart.str`Library Module: ${dart.dsend(libraryNames, 'join', '/')}`;
}
children(object) {
let children = LinkedHashSetOfNameValuePair().new();
« no previous file with comments | « lib/runtime/dart_library.js ('k') | tool/input_sdk/private/debugger.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698