Index: pkg/compiler/lib/src/js_emitter/code_emitter_task.dart |
diff --git a/pkg/compiler/lib/src/js_emitter/code_emitter_task.dart b/pkg/compiler/lib/src/js_emitter/code_emitter_task.dart |
index 4311617e27fcd7790e4e77fe7045dbadc3b549fb..ab6c76b21e80548d990f2c75cdddcabb4958406b 100644 |
--- a/pkg/compiler/lib/src/js_emitter/code_emitter_task.dart |
+++ b/pkg/compiler/lib/src/js_emitter/code_emitter_task.dart |
@@ -217,7 +217,7 @@ class CodeEmitterTask extends CompilerTask { |
this, |
closedWorld, |
typeTestRegistry.rtiNeededClasses, |
- compiler.mainFunction, |
+ closedWorld.elementEnvironment.mainFunction, |
isMockCompilation: compiler.isMockCompilation); |
int size = emitter.emitProgram(programBuilder); |
// TODO(floitsch): we shouldn't need the `neededClasses` anymore. |