Index: runtime/vm/deferred_objects.cc |
diff --git a/runtime/vm/deferred_objects.cc b/runtime/vm/deferred_objects.cc |
index f3cb4d87a509f3975bd253ab7c6e53d83ad191f1..ba620c4558f4e59a2ff66d54a2c73cf42a7135d9 100644 |
--- a/runtime/vm/deferred_objects.cc |
+++ b/runtime/vm/deferred_objects.cc |
@@ -137,6 +137,10 @@ void DeferredRetAddr::Materialize(DeoptContext* deopt_context) { |
CodePatcher::GetInstanceCallAt(pc, code, &ic_data); |
if (!ic_data.IsNull()) { |
ic_data.AddDeoptReason(deopt_context->deopt_reason()); |
+ // Propagate the reason to all ICData-s with same deopt_id since |
+ // only unoptimized-code ICData (IC calls) are propagated. |
+ function.SetDeoptReasonForAll(ic_data.deopt_id(), |
+ deopt_context->deopt_reason()); |
} |
} else { |
if (deopt_context->HasDeoptFlag(ICData::kHoisted)) { |