8262910: Cleanup THREAD/TRAPS/naming and typing issues in ObjectMonitor and related code

Reviewed-by: coleenp, pchilanomate, dcubed, cjplummer, sspitsyn
This commit is contained in:
David Holmes 2021-03-10 22:33:56 +00:00
parent 57f16f9fe5
commit c6d74bd933
18 changed files with 470 additions and 521 deletions

View file

@ -732,7 +732,7 @@ JRT_ENTRY_NO_ASYNC(void, InterpreterRuntime::monitorenter(JavaThread* thread, Ba
Handle h_obj(thread, elem->obj());
assert(Universe::heap()->is_in_or_null(h_obj()),
"must be NULL or an object");
ObjectSynchronizer::enter(h_obj, elem->lock(), CHECK);
ObjectSynchronizer::enter(h_obj, elem->lock(), thread);
assert(Universe::heap()->is_in_or_null(elem->obj()),
"must be NULL or an object");
#ifdef ASSERT
@ -752,7 +752,7 @@ JRT_LEAF(void, InterpreterRuntime::monitorexit(BasicObjectLock* elem))
}
return;
}
ObjectSynchronizer::exit(obj, elem->lock(), Thread::current());
ObjectSynchronizer::exit(obj, elem->lock(), JavaThread::current());
// Free entry. If it is not cleared, the exception handling code will try to unlock the monitor
// again at method exit or in the case of an exception.
elem->set_obj(NULL);