< prev index next >
src/hotspot/share/prims/jvmtiThreadState.hpp
Print this page
@@ -416,18 +416,20 @@
public:
RedefineVerifyMark(Klass* the_class, Klass* scratch_class,
JvmtiThreadState *state) : _state(state), _scratch_class(scratch_class)
{
_state->set_class_versions_map(the_class, scratch_class);
- _scratch_mirror = Handle(Thread::current(), _scratch_class->java_mirror());
- _scratch_class->set_java_mirror(the_class->java_mirror());
+ Thread* thread = Thread::current();
+ _scratch_mirror = Handle(thread, _scratch_class->java_mirror());
+ Handle the_mirror(thread, the_class->java_mirror());
+ _scratch_class->set_java_mirror(the_mirror);
}
~RedefineVerifyMark() {
// Restore the scratch class's mirror, so when scratch_class is removed
// the correct mirror pointing to it can be cleared.
- _scratch_class->set_java_mirror(_scratch_mirror());
+ _scratch_class->set_java_mirror(_scratch_mirror);
_state->clear_class_versions_map();
}
};
#endif // SHARE_VM_PRIMS_JVMTITHREADSTATE_HPP
< prev index next >