8252652: Buggy looking null check in ServiceThread::oops_do()

Remove the null check.

Reviewed-by: stefank
This commit is contained in:
Coleen Phillimore 2020-09-01 10:20:35 -04:00
parent 2c4fbbca23
commit 6428c693f0

View File

@ -261,14 +261,12 @@ void ServiceThread::oops_do(OopClosure* f, CodeBlobClosure* cf) {
JavaThread::oops_do(f, cf);
// The ServiceThread "owns" the JVMTI Deferred events, scan them here
// to keep them alive until they are processed.
if (cf != NULL) {
if (_jvmti_event != NULL) {
_jvmti_event->oops_do(f, cf);
}
// Requires a lock, because threads can be adding to this queue.
MutexLocker ml(Service_lock, Mutex::_no_safepoint_check_flag);
_jvmti_service_queue.oops_do(f, cf);
if (_jvmti_event != NULL) {
_jvmti_event->oops_do(f, cf);
}
// Requires a lock, because threads can be adding to this queue.
MutexLocker ml(Service_lock, Mutex::_no_safepoint_check_flag);
_jvmti_service_queue.oops_do(f, cf);
}
void ServiceThread::nmethods_do(CodeBlobClosure* cf) {