field_offset.Uint32Value());
DCHECK(f != nullptr);
DCHECK(!f->IsStatic());
+ StackHandleScope<1> hs(Thread::Current());
+ // Save obj in case the instrumentation event has thread suspension.
+ HandleWrapperObjPtr<mirror::Object> h = hs.NewHandleWrapper(&obj);
instrumentation->FieldReadEvent(Thread::Current(),
obj.Ptr(),
shadow_frame.GetMethod(),
DCHECK(f != nullptr);
DCHECK(!f->IsStatic());
JValue field_value = GetFieldValue<field_type>(shadow_frame, vregA);
+ StackHandleScope<1> hs(Thread::Current());
+ // Save obj in case the instrumentation event has thread suspension.
+ HandleWrapperObjPtr<mirror::Object> h = hs.NewHandleWrapper(&obj);
instrumentation->FieldWriteEvent(Thread::Current(),
obj.Ptr(),
shadow_frame.GetMethod(),