The error message printed out into the log is generated by the GET_MAIN_JENV macro when it detects that the JVM is detached. But lately macOS became more and more asynchronous and is caching accessibility objects references so it is possible that during the application shutdown the system keeps calling these native a11y methods. We already have a safeguard in place defending us from this scenario - in all places after we call GET_MAIN_JENV we check that env is not set to NULL before attempting to call Java methods. So i am replacing GET_MAIN_JENV macro usage with GET_MAIN_JENV_NOWARN which does exactly the same but does not generate the error message and stack dump in the stderr.
--------- - [x] I confirm that I make this contribution in accordance with the [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). ------------- Commit messages: - 8206133: [Accessibility, macOS] Native assertion errors in glass on JavaFX application shutdown Changes: https://git.openjdk.org/jfx/pull/2339/files Webrev: https://webrevs.openjdk.org/?repo=jfx&pr=2339&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8206133 Stats: 29 lines in 4 files changed: 1 ins; 0 del; 28 mod Patch: https://git.openjdk.org/jfx/pull/2339.diff Fetch: git fetch https://git.openjdk.org/jfx.git pull/2339/head:pull/2339 PR: https://git.openjdk.org/jfx/pull/2339
