src/hotspot/share/runtime/synchronizer.cpp
changeset 57734 18f4d3d46d54
parent 57602 dbe471d2f8f8
child 57777 90ead0febf56
equal deleted inserted replaced
57733:be8c11fc16bb 57734:18f4d3d46d54
   427     obj = h_obj();
   427     obj = h_obj();
   428   }
   428   }
   429   assert(!obj->mark()->has_bias_pattern(), "biases should be revoked by now");
   429   assert(!obj->mark()->has_bias_pattern(), "biases should be revoked by now");
   430 
   430 
   431   ObjectMonitor* monitor = inflate(THREAD, obj, inflate_cause_jni_exit);
   431   ObjectMonitor* monitor = inflate(THREAD, obj, inflate_cause_jni_exit);
   432   // If this thread has locked the object, exit the monitor.  Note:  can't use
   432   // If this thread has locked the object, exit the monitor. We
   433   // monitor->check(CHECK); must exit even if an exception is pending.
   433   // intentionally do not use CHECK here because we must exit the
   434   if (monitor->check(THREAD)) {
   434   // monitor even if an exception is pending.
       
   435   if (monitor->check_owner(THREAD)) {
   435     monitor->exit(true, THREAD);
   436     monitor->exit(true, THREAD);
   436   }
   437   }
   437 }
   438 }
   438 
   439 
   439 // -----------------------------------------------------------------------------
   440 // -----------------------------------------------------------------------------