equal
deleted
inserted
replaced
458 } |
458 } |
459 |
459 |
460 oop InstanceKlass::init_lock() const { |
460 oop InstanceKlass::init_lock() const { |
461 // return the init lock from the mirror |
461 // return the init lock from the mirror |
462 oop lock = java_lang_Class::init_lock(java_mirror()); |
462 oop lock = java_lang_Class::init_lock(java_mirror()); |
|
463 // Prevent reordering with any access of initialization state |
|
464 OrderAccess::loadload(); |
463 assert((oop)lock != NULL || !is_not_initialized(), // initialized or in_error state |
465 assert((oop)lock != NULL || !is_not_initialized(), // initialized or in_error state |
464 "only fully initialized state can have a null lock"); |
466 "only fully initialized state can have a null lock"); |
465 return lock; |
467 return lock; |
466 } |
468 } |
467 |
469 |