RFR: 8349145: Make Class.getProtectionDomain() non-native [v4]
Coleen Phillimore
coleenp at openjdk.org
Tue Feb 4 16:59:10 UTC 2025
On Tue, 4 Feb 2025 16:37:10 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> One of the reasons I wanted to move this out of Hotspot as a native call is that it might make further work with ProtectionDomain easier to do all in Java, except there's still a bit of coupling in the JVM with the name of the class and that it's passed through defineClass (resolve_from_stream) and initialized in the mirror. So I guess that's still a lot.
>
> Aside from JVMTI (CFLH for example), is there anything left in the VM that needs this? The last param to JVM_DefineClassWithSource has the location from the code source if available.
The VM doesn't need this but it carries it around because it's a parameter to JVM_DefineClass and DefineClassWithSource (second to last parameter). CFLH and CDS from what I can tell have it for the same purpose - ultimately to assign it into the mirror.
There are some remaining code in the compilers (ci). Not sure if they are needed without studying it more.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23396#discussion_r1941554835
More information about the core-libs-dev
mailing list