Index: src/factory.cc |
diff --git a/src/factory.cc b/src/factory.cc |
index cbb6ca301a86411bbd101a9eb1fffaaebf0985e2..94da1681af27527728e7a40fb72a681cbe2f56f6 100644 |
--- a/src/factory.cc |
+++ b/src/factory.cc |
@@ -1373,6 +1373,7 @@ Handle<JSFunction> Factory::NewFunctionFromSharedFunctionInfo( |
if (isolate()->use_crankshaft() && |
FLAG_always_opt && |
result->is_compiled() && |
+ !info->is_toplevel() && |
// TODO(mstarzinger): Extend to optimization of builtin code. |
!isolate()->bootstrapper()->IsActive() && |
info->allows_lazy_compilation() && |