src/hotspot/share/classfile/classLoaderData.cpp
changeset 58177 4932dce35882
parent 55603 3868dde58ebb
child 58199 595fcbebaa77
child 58375 a1eba2e37671
equal deleted inserted replaced
58176:470af058bd5f 58177:4932dce35882
   230 
   230 
   231  public:
   231  public:
   232   VerifyContainsOopClosure(oop target) : _target(target), _found(false) {}
   232   VerifyContainsOopClosure(oop target) : _target(target), _found(false) {}
   233 
   233 
   234   void do_oop(oop* p) {
   234   void do_oop(oop* p) {
   235     if (p != NULL && oopDesc::equals(NativeAccess<AS_NO_KEEPALIVE>::oop_load(p), _target)) {
   235     if (p != NULL && NativeAccess<AS_NO_KEEPALIVE>::oop_load(p) == _target) {
   236       _found = true;
   236       _found = true;
   237     }
   237     }
   238   }
   238   }
   239 
   239 
   240   void do_oop(narrowOop* p) {
   240   void do_oop(narrowOop* p) {
   431     to = to_cld->class_loader();
   431     to = to_cld->class_loader();
   432     oop from = from_cld->class_loader();
   432     oop from = from_cld->class_loader();
   433 
   433 
   434     // Just return if this dependency is to a class with the same or a parent
   434     // Just return if this dependency is to a class with the same or a parent
   435     // class_loader.
   435     // class_loader.
   436     if (oopDesc::equals(from, to) || java_lang_ClassLoader::isAncestor(from, to)) {
   436     if (from == to || java_lang_ClassLoader::isAncestor(from, to)) {
   437       return; // this class loader is in the parent list, no need to add it.
   437       return; // this class loader is in the parent list, no need to add it.
   438     }
   438     }
   439   }
   439   }
   440 
   440 
   441   // It's a dependency we won't find through GC, add it.
   441   // It's a dependency we won't find through GC, add it.