| Index: lib/compiler/implementation/js_backend/namer.dart
|
| diff --git a/lib/compiler/implementation/js_backend/namer.dart b/lib/compiler/implementation/js_backend/namer.dart
|
| index dafdacc506b87803fa360ff927247082f71abcbd..a5ec408306d4d29ef453bb18f8a2d632f737bd28 100644
|
| --- a/lib/compiler/implementation/js_backend/namer.dart
|
| +++ b/lib/compiler/implementation/js_backend/namer.dart
|
| @@ -18,6 +18,12 @@ class Namer {
|
| return _jsReserved;
|
| }
|
|
|
| + /**
|
| + * Map from top-level or static elements to their unique identifiers provided
|
| + * by [getName].
|
| + *
|
| + * Invariant: Keys must be declaration elements.
|
| + */
|
| final Map<Element, String> globals;
|
| final Map<String, int> usedGlobals;
|
| final Map<String, LibraryElement> shortPrivateNameOwners;
|
| @@ -243,6 +249,9 @@ class Namer {
|
| node: element.parseNode(compiler));
|
| }
|
| } else {
|
| + // Use declaration element to ensure invariant on [globals].
|
| + element = element.declaration;
|
| +
|
| // Dealing with a top-level or static element.
|
| String cached = globals[element];
|
| if (cached !== null) return cached;
|
|
|