Index: src/compiler.cc |
diff --git a/src/compiler.cc b/src/compiler.cc |
index cbf53a5e86e90cc1ec28c019aa1ffef0c307d734..520db34160de6efb17e5a3331f319255488038e8 100644 |
--- a/src/compiler.cc |
+++ b/src/compiler.cc |
@@ -119,6 +119,7 @@ bool CompilationInfo::ShouldSelfOptimize() { |
!Serializer::enabled() && |
!function()->flags()->Contains(kDontSelfOptimize) && |
!function()->flags()->Contains(kDontOptimize) && |
+ function()->scope()->allows_lazy_recompilation() && |
(shared_info().is_null() || !shared_info()->optimization_disabled()); |
} |