--- old/src/share/vm/classfile/dictionary.cpp 2015-10-08 22:15:39.379501956 +0200 +++ new/src/share/vm/classfile/dictionary.cpp 2015-10-08 22:15:39.297503914 +0200 @@ -80,13 +80,14 @@ bool DictionaryEntry::contains_protection_domain(oop protection_domain) const { #ifdef ASSERT - if (protection_domain == InstanceKlass::cast(klass())->protection_domain()) { + protection_domain = oopDesc::bs()->write_barrier(protection_domain); + if (protection_domain == oopDesc::bs()->write_barrier(InstanceKlass::cast(klass())->protection_domain())) { // Ensure this doesn't show up in the pd_set (invariant) bool in_pd_set = false; for (ProtectionDomainEntry* current = _pd_set; current != NULL; current = current->next()) { - if (current->protection_domain() == protection_domain) { + if (oopDesc::bs()->write_barrier(current->protection_domain()) == protection_domain) { in_pd_set = true; break; } @@ -98,7 +99,7 @@ } #endif /* ASSERT */ - if (protection_domain == InstanceKlass::cast(klass())->protection_domain()) { + if (protection_domain == oopDesc::bs()->write_barrier(InstanceKlass::cast(klass())->protection_domain())) { // Succeeds trivially return true; } @@ -106,7 +107,7 @@ for (ProtectionDomainEntry* current = _pd_set; current != NULL; current = current->next()) { - if (current->protection_domain() == protection_domain) return true; + if (oopDesc::bs()->write_barrier(current->protection_domain()) == protection_domain) return true; } return false; } @@ -777,4 +778,3 @@ _pd_cache_table->verify(); } -