| Index: runtime/vm/deopt_instructions.cc
|
| diff --git a/runtime/vm/deopt_instructions.cc b/runtime/vm/deopt_instructions.cc
|
| index 8b0aa722c8b1911d4f1a0ecfaf99734309da24f9..fffd6673c31eb5da0223848113d92a037156283a 100644
|
| --- a/runtime/vm/deopt_instructions.cc
|
| +++ b/runtime/vm/deopt_instructions.cc
|
| @@ -666,9 +666,14 @@ class DeoptPcMarkerInstr : public DeoptInstr {
|
| return;
|
| }
|
|
|
| - *dest_addr = reinterpret_cast<intptr_t>(Object::null());
|
| - deopt_context->DeferPcMarkerMaterialization(
|
| - object_table_index_, dest_addr);
|
| + // We don't always have the Code object for the frame's corresponding
|
| + // unoptimized code as it may have been collected. Use a stub as the pc
|
| + // marker until we can recreate that Code object during deferred
|
| + // materialization to maintain the invariant that Dart frames always have
|
| + // a pc marker.
|
| + *reinterpret_cast<RawObject**>(dest_addr) =
|
| + StubCode::FrameAwaitingMaterialization_entry()->code();
|
| + deopt_context->DeferPcMarkerMaterialization(object_table_index_, dest_addr);
|
| }
|
|
|
| private:
|
|
|