RFR: 8292375: Convert ProtectionDomainCacheTable to ResourceHashtable [v3]
Ioi Lam
iklam at openjdk.org
Tue Aug 30 18:17:12 UTC 2022
On Mon, 29 Aug 2022 12:10:48 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> src/hotspot/share/classfile/protectionDomainCache.cpp line 43:
>>
>>> 41:
>>> 42: unsigned int ProtectionDomainCacheTable::compute_hash(const WeakHandle& protection_domain) {
>>> 43: return (unsigned int)(protection_domain.resolve()->identity_hash());
>>
>> And if it is a `WeakHandle` can't `resolve` now return NULL?
>
> compute_hash() is always called on a live WeakHandle so will never return null.
I think you should add an assert that the `protection_domain.resolve()` never returns null, with a comment explaining why.
-------------
PR: https://git.openjdk.org/jdk/pull/10043
More information about the hotspot-dev
mailing list