src/hotspot/share/gc/g1/g1OopClosures.cpp
changeset 58263 4fbc534fdf69
parent 52348 21fdf8d9a8b6
--- a/src/hotspot/share/gc/g1/g1OopClosures.cpp	Mon Sep 23 11:36:53 2019 +0200
+++ b/src/hotspot/share/gc/g1/g1OopClosures.cpp	Mon Sep 23 11:37:02 2019 +0200
@@ -43,16 +43,14 @@
 
 void G1CLDScanClosure::do_cld(ClassLoaderData* cld) {
   // If the class loader data has not been dirtied we know that there's
-  // no references into  the young gen and we can skip it.
+  // no references into the young gen and we can skip it.
   if (!_process_only_dirty || cld->has_modified_oops()) {
 
     // Tell the closure that this class loader data is the CLD to scavenge
     // and is the one to dirty if oops are left pointing into the young gen.
     _closure->set_scanned_cld(cld);
-
-    // Clean the cld since we're going to scavenge all the metadata.
-    // Clear modified oops only if this cld is claimed.
-    cld->oops_do(_closure, _claim, /*clear_modified_oops*/true);
+    // Clean modified oops since we're going to scavenge all the metadata.
+    cld->oops_do(_closure, ClassLoaderData::_claim_none, true /*clear_modified_oops*/);
 
     _closure->set_scanned_cld(NULL);