| Index: pkg/compiler/lib/src/js_backend/namer.dart
|
| diff --git a/pkg/compiler/lib/src/js_backend/namer.dart b/pkg/compiler/lib/src/js_backend/namer.dart
|
| index 97ad11cc52e0f3c5d8cec3ddf72f078f4c01bc5a..c46cc9bf812ffeb25b950d87dbb3e073ba2c3fc8 100644
|
| --- a/pkg/compiler/lib/src/js_backend/namer.dart
|
| +++ b/pkg/compiler/lib/src/js_backend/namer.dart
|
| @@ -1497,9 +1497,19 @@ class Namer {
|
| }
|
|
|
| /// Returns [staticStateHolder] or one of [reservedGlobalObjectNames].
|
| + // TODO(johnniwinther): Verify that the implementation can be changed to
|
| + // `globalObjectForLibrary(element.library)`.
|
| + String globalObjectForMethod(MethodElement element) =>
|
| + globalObjectFor(element);
|
| +
|
| + /// Returns [staticStateHolder] or one of [reservedGlobalObjectNames].
|
| String globalObjectFor(Element element) {
|
| if (_isPropertyOfStaticStateHolder(element)) return staticStateHolder;
|
| - LibraryElement library = element.library;
|
| + return globalObjectForLibrary(element.library);
|
| + }
|
| +
|
| + /// Returns the [reservedGlobalObjectNames] for [library].
|
| + String globalObjectForLibrary(LibraryElement library) {
|
| if (library == helpers.interceptorsLibrary) return 'J';
|
| if (library.isInternalLibrary) return 'H';
|
| if (library.isPlatformLibrary) {
|
|
|