Index: src/runtime.cc |
diff --git a/src/runtime.cc b/src/runtime.cc |
index 98fe997d7275bef4f635376b11e48a998d111c0c..1405cb1240050a5b97f11c5cf1663e251fa25f92 100644 |
--- a/src/runtime.cc |
+++ b/src/runtime.cc |
@@ -8802,8 +8802,10 @@ RUNTIME_FUNCTION(Runtime_CompileForOnStackReplacement) { |
BailoutId ast_id = caller_code->TranslatePcOffsetToAstId(pc_offset); |
ASSERT(!ast_id.IsNone()); |
- Compiler::ConcurrencyMode mode = isolate->concurrent_osr_enabled() |
- ? Compiler::CONCURRENT : Compiler::NOT_CONCURRENT; |
+ Compiler::ConcurrencyMode mode = |
+ isolate->concurrent_osr_enabled() && |
+ (caller_code->CodeSize() > 32 * FullCodeGenerator::kCodeSizeMultiplier) |
+ ? Compiler::CONCURRENT : Compiler::NOT_CONCURRENT; |
Handle<Code> result = Handle<Code>::null(); |
OptimizedCompileJob* job = NULL; |