hotspot/src/share/vm/oops/instanceKlass.cpp
changeset 26556 72da4c813e44
parent 26316 93f6b40c038b
child 26558 b7df27df6384
equal deleted inserted replaced
26419:25abc4a3285c 26556:72da4c813e44
   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