On Tue, 24 Sep 2024 14:48:50 GMT, Jorn Vernee <jver...@openjdk.org> wrote:
>> The "stack" is exposed in the API with StackWalker, Thread::getStackTrace >> and other APIs. For CS and restricted methods then I think we are trying to >> convey that there are no Java frames on the caller stack. Several existing >> CS APIs document the case where there is "no caller frame on the stack". >> This is mostly to cover the case where a CS method is invoked from a JNI >> attached thread. If there are native frames sandwiched between Java frames >> and a CS method then the intention was that these methods use the Java frame >> for the check, but that is hard to specify and it sounds like we have to >> re-visit this a bit. >> >> For now, I think the proposed wording in this PR is okay. There are clearly >> some follows up needed. > >> For now, I think the proposed wording in this PR is okay. > > Yes, I agree what I'm suggesting is out of scope for this PR. > as an example explicitly enumerate the cases in which the caller class can > not be determined by the reference implementation Any accessible CS method can be called directly from JNI and so have no Java caller on the stack. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/21067#discussion_r1783749430