mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-25 09:40:10 +00:00
review: convert a couple of sanity checks into asserts
This commit is contained in:
parent
5a2184c2c5
commit
0bacfa4ffe
@ -120,7 +120,7 @@ JvmtiThreadState::JvmtiThreadState(JavaThread* thread, oop thread_oop)
|
||||
// The JavaThread for an active carrier or a mounted virtual thread case.
|
||||
// Set this only if thread_oop is current thread->jvmti_vthread().
|
||||
thread->set_jvmti_thread_state(this);
|
||||
thread->set_interp_only_mode(false);
|
||||
assert(!thread->is_interp_only_mode(), "sanity check");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -135,10 +135,9 @@ JvmtiThreadState::~JvmtiThreadState() {
|
||||
|
||||
// clear this as the state for the thread
|
||||
assert(get_thread() != nullptr, "sanity check");
|
||||
if (get_thread()->jvmti_thread_state() == this) { // check for safety
|
||||
get_thread()->set_jvmti_thread_state(nullptr);
|
||||
get_thread()->set_interp_only_mode(false);
|
||||
}
|
||||
assert(get_thread()->jvmti_thread_state() == this, "sanity check");
|
||||
get_thread()->set_jvmti_thread_state(nullptr);
|
||||
get_thread()->set_interp_only_mode(false);
|
||||
|
||||
// zap our env thread states
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user