./src/share/vm/prims/jvmtiEnv.cpp
Print this page
rev 4331 : review #1
@@ -257,11 +257,12 @@
// Not cached, we need to reconstitute the class file from the
// VM representation. We don't attach the reconstituted class
// bytes to the InstanceKlass here because they have not been
// validated and we're not at a safepoint.
constantPoolHandle constants(current_thread, ikh->constants());
- MonitorLockerEx ml(constants->lock()); // lock constant pool while we query it
+ oop cplock = constants->lock();
+ ObjectLocker ol(cplock, current_thread, cplock != NULL); // lock constant pool while we query it
JvmtiClassFileReconstituter reconstituter(ikh);
if (reconstituter.get_error() != JVMTI_ERROR_NONE) {
return reconstituter.get_error();
}
@@ -2415,11 +2416,12 @@
return JVMTI_ERROR_ABSENT_INFORMATION;
}
instanceKlassHandle ikh(thread, k_oop);
constantPoolHandle constants(thread, ikh->constants());
- MonitorLockerEx ml(constants->lock()); // lock constant pool while we query it
+ oop cplock = constants->lock();
+ ObjectLocker ol(cplock, thread, cplock != NULL); // lock constant pool while we query it
JvmtiConstantPoolReconstituter reconstituter(ikh);
if (reconstituter.get_error() != JVMTI_ERROR_NONE) {
return reconstituter.get_error();
}