< prev index next >

src/hotspot/share/classfile/dictionary.cpp

roman_version
   return (desired_size != 0);
 }
 
 bool DictionaryEntry::contains_protection_domain(oop protection_domain) const {
 #ifdef ASSERT
-  if (protection_domain == instance_klass()->protection_domain()) {
+  if (oopDesc::equals(protection_domain, instance_klass()->protection_domain())) {
     // Ensure this doesn't show up in the pd_set (invariant)
     bool in_pd_set = false;
     for (ProtectionDomainEntry* current = pd_set_acquire();
                                 current != NULL;
                                 current = current->next()) {
-      if (current->object_no_keepalive() == protection_domain) {
+      if (oopDesc::equals(current->object_no_keepalive(), protection_domain)) {
         in_pd_set = true;
         break;
       }
     }
     if (in_pd_set) {

@@ -177,19 +177,19 "in its sys. dict. PD set"); } } #endif /* ASSERT */ - if (protection_domain == instance_klass()->protection_domain()) { + if (oopDesc::equals(protection_domain, instance_klass()->protection_domain())) { // Succeeds trivially return true; } for (ProtectionDomainEntry* current = pd_set_acquire(); current != NULL; current = current->next()) { - if (current->object_no_keepalive() == protection_domain) return true; + if (oopDesc::equals(current->object_no_keepalive(), protection_domain)) return true; } return false; }
< prev index next >