On Thu, 18 Jul 2024 13:48:06 GMT, Chen Liang <li...@openjdk.org> wrote:
>> `Class` has 2 VM-injected fields that can be made explicit: `Object[] >> signers` and `ProtectionDomain protectionDomain`. We make the signers field >> explicit. (The ProtectionDomain can be revisited when SecurityManager is >> removed, as SecurityManager is accessing it via JNI as well.) >> >> Migrate the JNI code to Java. The getter previously had a redundant >> primitive type check, which is dropped in the migrated Java code. The >> `Object[] getSigners` is no longer `native`, thus requiring a CSR record. >> Reviewers please help review the associated CSR. > > Chen Liang has updated the pull request with a new target base due to a merge > or a rebase. The incremental webrev excludes the unrelated changes brought in > by the merge/rebase. The pull request contains three additional commits since > the last revision: > > - Merge branch 'master' of https://github.com/openjdk/jdk into > feature/class-signers > - Reorder comment of classData to avoid misunderstanding > - 8334772: Change Class::signers to an explicit field I am not a hprof expert but AFAICS the `HPROF_GC_CLASS_DUMP` contains an explicit id for the classloader, signers, and pd, of the class, and then later a list of all fields declared in the class. AFAICS there is no real connection between these, so it doesn't matter if the classloader/signers/pd is an injected field, a regular Java field, or not a field at all. So in that regard it seems `signers` will now be handled the same way as `classloader` and so that should be fine. ------------- Marked as reviewed by dholmes (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/20223#pullrequestreview-2186999675