Index: pkg/compiler/lib/src/js_backend/interceptor_data.dart |
diff --git a/pkg/compiler/lib/src/js_backend/interceptor_data.dart b/pkg/compiler/lib/src/js_backend/interceptor_data.dart |
index e09aaf7864fdc64ceba4ab097e3f20b65bba626f..3d2009f25fcb86fb3b9c1539f1f9998d72b5bbf8 100644 |
--- a/pkg/compiler/lib/src/js_backend/interceptor_data.dart |
+++ b/pkg/compiler/lib/src/js_backend/interceptor_data.dart |
@@ -5,6 +5,7 @@ |
library js_backend.interceptor_data; |
import '../common/names.dart' show Identifiers; |
+import '../common/resolution.dart' show Resolution; |
import '../common_elements.dart' show CommonElements; |
import '../elements/elements.dart'; |
import '../elements/entities.dart'; |
@@ -216,6 +217,7 @@ class InterceptorDataBuilderImpl implements InterceptorDataBuilder { |
final NativeData _nativeData; |
final BackendHelpers _helpers; |
final CommonElements _commonElements; |
+ final Resolution _resolution; |
Siggi Cherem (dart-lang)
2017/03/14 03:35:17
any chance that we are guaranteed that cls argumen
Johnni Winther
2017/03/15 10:10:20
Still investigating. It will be gone soon!
|
/// The members of instantiated interceptor classes: maps a member name to the |
/// list of members that have that name. This map is used by the codegen to |
@@ -233,7 +235,7 @@ class InterceptorDataBuilderImpl implements InterceptorDataBuilder { |
new Set<ClassElement>(); |
InterceptorDataBuilderImpl( |
- this._nativeData, this._helpers, this._commonElements); |
+ this._nativeData, this._helpers, this._commonElements, this._resolution); |
InterceptorData onResolutionComplete(ClosedWorld closedWorld) { |
return new InterceptorDataImpl( |
@@ -246,6 +248,7 @@ class InterceptorDataBuilderImpl implements InterceptorDataBuilder { |
} |
void addInterceptorsForNativeClassMembers(ClassElement cls) { |
+ cls.ensureResolved(_resolution); |
cls.forEachMember((ClassElement classElement, Element member) { |
if (member.name == Identifiers.call) { |
return; |
@@ -269,6 +272,7 @@ class InterceptorDataBuilderImpl implements InterceptorDataBuilder { |
void addInterceptors(ClassElement cls) { |
if (_interceptedClasses.add(cls)) { |
+ cls.ensureResolved(_resolution); |
cls.forEachMember((ClassElement classElement, Element member) { |
// All methods on [Object] are shadowed by [Interceptor]. |
if (classElement == _commonElements.objectClass) return; |