Index: src/factory.cc |
diff --git a/src/factory.cc b/src/factory.cc |
index e6063f3e0bb04e6fd2cd835bc58304f2904a9dcd..143099cfb8f5235a25e18b9a493aaddfdba3c6a0 100644 |
--- a/src/factory.cc |
+++ b/src/factory.cc |
@@ -554,7 +554,8 @@ Handle<JSFunction> Factory::NewFunctionFromSharedFunctionInfo( |
FLAG_always_opt && |
result->is_compiled() && |
!function_info->is_toplevel() && |
- function_info->allows_lazy_compilation()) { |
+ function_info->allows_lazy_compilation() && |
+ !function_info->optimization_disabled()) { |
result->MarkForLazyRecompilation(); |
} |
return result; |