Index: src/x64/lithium-codegen-x64.cc |
diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc |
index 082a480ee85937092785c2f8fcaf5a4c42fd25ef..64366e2db46e7a3afeb96df0b2fc94930a4fe834 100644 |
--- a/src/x64/lithium-codegen-x64.cc |
+++ b/src/x64/lithium-codegen-x64.cc |
@@ -793,6 +793,13 @@ void LCodeGen::PopulateDeoptimizationData(Handle<Code> code) { |
data->SetTranslationByteArray(*translations); |
data->SetInlinedFunctionCount(Smi::FromInt(inlined_function_count_)); |
data->SetOptimizationId(Smi::FromInt(info_->optimization_id())); |
+ if (info_->IsOptimizing()) { |
+ // Reference to shared function info does not change between phases. |
+ AllowDeferredHandleDereference allow_handle_dereference; |
+ data->SetSharedFunctionInfo(*info_->shared_info()); |
+ } else { |
+ data->SetSharedFunctionInfo(Smi::FromInt(0)); |
+ } |
Handle<FixedArray> literals = |
factory()->NewFixedArray(deoptimization_literals_.length(), TENURED); |