diff options
| author | 2016-10-27 08:08:35 +0000 | |
|---|---|---|
| committer | 2016-10-27 08:08:35 +0000 | |
| commit | bbfd7f99888a70e912c9d01a0bd35cee7d294fdb (patch) | |
| tree | 11cd3182265c3426b00a34acc5c36961b351408f /runtime/interpreter/interpreter_common.cc | |
| parent | 4cae498641fe3afccbafb5cbdbed9951f6949f41 (diff) | |
| parent | a314773a624f9f51391be91bda3472bbdbe0050e (diff) | |
Merge "Add handle wrapper for interpreter iget/iput quick"
Diffstat (limited to 'runtime/interpreter/interpreter_common.cc')
| -rw-r--r-- | runtime/interpreter/interpreter_common.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/runtime/interpreter/interpreter_common.cc b/runtime/interpreter/interpreter_common.cc index f212cda2a4..1ed3d550b9 100644 --- a/runtime/interpreter/interpreter_common.cc +++ b/runtime/interpreter/interpreter_common.cc @@ -163,6 +163,9 @@ bool DoIGetQuick(ShadowFrame& shadow_frame, const Instruction* inst, uint16_t in 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(), @@ -392,6 +395,9 @@ bool DoIPutQuick(const ShadowFrame& shadow_frame, const Instruction* inst, uint1 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(), |