mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8182720: In InstanceKlass.cpp, get init_lock from handle
Replace init_lock() calls with h_init_lock() calls Reviewed-by: sspitsyn, coleenp
This commit is contained in:
parent
08361aedba
commit
5e4cca403b
1 changed files with 5 additions and 5 deletions
|
@ -436,7 +436,7 @@ void InstanceKlass::eager_initialize_impl() {
|
|||
EXCEPTION_MARK;
|
||||
HandleMark hm(THREAD);
|
||||
Handle h_init_lock(THREAD, init_lock());
|
||||
ObjectLocker ol(h_init_lock, THREAD, init_lock() != NULL);
|
||||
ObjectLocker ol(h_init_lock, THREAD, h_init_lock() != NULL);
|
||||
|
||||
// abort if someone beat us to the initialization
|
||||
if (!is_not_initialized()) return; // note: not equivalent to is_initialized()
|
||||
|
@ -584,7 +584,7 @@ bool InstanceKlass::link_class_impl(bool throw_verifyerror, TRAPS) {
|
|||
{
|
||||
HandleMark hm(THREAD);
|
||||
Handle h_init_lock(THREAD, init_lock());
|
||||
ObjectLocker ol(h_init_lock, THREAD, init_lock() != NULL);
|
||||
ObjectLocker ol(h_init_lock, THREAD, h_init_lock() != NULL);
|
||||
// rewritten will have been set if loader constraint error found
|
||||
// on an earlier link attempt
|
||||
// don't verify or rewrite if already rewritten
|
||||
|
@ -710,7 +710,7 @@ void InstanceKlass::initialize_impl(TRAPS) {
|
|||
// Step 1
|
||||
{
|
||||
Handle h_init_lock(THREAD, init_lock());
|
||||
ObjectLocker ol(h_init_lock, THREAD, init_lock() != NULL);
|
||||
ObjectLocker ol(h_init_lock, THREAD, h_init_lock() != NULL);
|
||||
|
||||
Thread *self = THREAD; // it's passed the current thread
|
||||
|
||||
|
@ -846,13 +846,13 @@ void InstanceKlass::initialize_impl(TRAPS) {
|
|||
|
||||
void InstanceKlass::set_initialization_state_and_notify(ClassState state, TRAPS) {
|
||||
Handle h_init_lock(THREAD, init_lock());
|
||||
if (init_lock() != NULL) {
|
||||
if (h_init_lock() != NULL) {
|
||||
ObjectLocker ol(h_init_lock, THREAD);
|
||||
set_init_state(state);
|
||||
fence_and_clear_init_lock();
|
||||
ol.notify_all(CHECK);
|
||||
} else {
|
||||
assert(init_lock() != NULL, "The initialization state should never be set twice");
|
||||
assert(h_init_lock() != NULL, "The initialization state should never be set twice");
|
||||
set_init_state(state);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue