Index: pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart |
diff --git a/pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart b/pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart |
index c52b465d4667a2c21d2f2f3b475a72feebd5b035..ad8fa35a7bbcbbf690141ca3007118df8013784f 100644 |
--- a/pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart |
+++ b/pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart |
@@ -2030,8 +2030,10 @@ function(originalDescriptor, name, holder, isStatic, globalFunctionsAccess) { |
// native elements. |
ClassElement cls = |
element.enclosingClassOrCompilationUnit.declaration; |
- if (compiler.codegenWorld.directlyInstantiatedClasses.contains(cls) |
- && !cls.isNative) { |
+ if (compiler.codegenWorld.directlyInstantiatedClasses.contains(cls) && |
+ !cls.isNative && |
+ compiler.deferredLoadTask.outputUnitForElement(element) == |
+ compiler.deferredLoadTask.outputUnitForElement(cls)) { |
owner = cls; |
} |
} |