Index: src/compiler/code-generator.cc |
diff --git a/src/compiler/code-generator.cc b/src/compiler/code-generator.cc |
index 4f13b4cfe5beee4c78727d1ec086bab457036808..09438f912e35c8fe23e43d67423200a46a1fb83c 100644 |
--- a/src/compiler/code-generator.cc |
+++ b/src/compiler/code-generator.cc |
@@ -84,7 +84,7 @@ Handle<Code> CodeGenerator::GenerateCode() { |
FinishCode(masm()); |
- // Ensure there is space for lazy deopt. |
+ // Ensure there is space for lazy deoptimization in the code. |
if (!info->IsStub()) { |
int target_offset = masm()->pc_offset() + Deoptimizer::patch_size(); |
while (masm()->pc_offset() < target_offset) { |
@@ -107,7 +107,10 @@ Handle<Code> CodeGenerator::GenerateCode() { |
PopulateDeoptimizationData(result); |
- EnsureRelocSpaceForLazyDeopt(result); |
+ // Ensure there is space for lazy deoptimization in the relocation info. |
+ if (!info->IsStub()) { |
+ Deoptimizer::EnsureRelocSpaceForLazyDeoptimization(result); |
+ } |
// Emit a code line info recording stop event. |
void* line_info = recorder->DetachJITHandlerData(); |