Chromium Code Reviews| Index: pkg/compiler/lib/src/js_emitter/native_emitter.dart |
| diff --git a/pkg/compiler/lib/src/js_emitter/native_emitter.dart b/pkg/compiler/lib/src/js_emitter/native_emitter.dart |
| index 5749e7903fe34ba65a292e9a74be72a988352bf9..03759c607718a6289f08c1162ef28a6639fbd0f1 100644 |
| --- a/pkg/compiler/lib/src/js_emitter/native_emitter.dart |
| +++ b/pkg/compiler/lib/src/js_emitter/native_emitter.dart |
| @@ -168,10 +168,14 @@ class NativeEmitter { |
| } |
| } |
| - // Add properties containing the information needed to construct maps used |
| - // by getNativeInterceptor and custom elements. |
| - if (compiler.enqueuer.codegen.nativeEnqueuer |
| - .hasInstantiatedNativeClasses()) { |
| + Set<Class> unneededClasses = classes |
| + .where((Class cls) => cls.isNative && !neededClasses.contains(cls)) |
| + .toSet(); |
| + |
| + // If native classes are emitted, add properties containing the information |
| + // needed to construct maps used by getNativeInterceptor and custom |
| + // elements. |
| + if (classes.length != unneededClasses.length) { |
|
floitsch
2015/02/26 18:12:12
Explain when/why this can happen.
From what I und
zarah
2015/02/27 09:03:48
It happens in the case you mention, I am not compl
|
| void generateClassInfo(Class cls) { |
| // Property has the form: |
| // |
| @@ -218,9 +222,7 @@ class NativeEmitter { |
| // (floitsch: was run on every native class.) |
| //assert(!classElement.hasBackendMembers); |
| - return classes |
| - .where((Class cls) => cls.isNative && !neededClasses.contains(cls)) |
| - .toSet(); |
| + return unneededClasses; |
| } |
| /** |