On Tue, 30 Jan 2024 14:13:07 GMT, Alexey Ivanov <[email protected]> wrote:
>> Christoph Langer 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 six additional >> commits since the last revision: >> >> - Move Exception Check to the right place >> - Merge branch 'master' into JDK-8323664 >> - Changes to assertion function and test as discussed >> - Revert "JDK-8323664" >> >> This reverts commit 32128744252d75104e0d19f5eb701ffdc7b3d417. >> - Merge branch 'master' into JDK-8323664 >> - JDK-8323664 > > src/java.desktop/windows/native/libawt/windows/awt_Debug.cpp line 158: > >> 156: // be on the safe side and avoid JNI warnings by calling >> ExceptionCheck >> 157: // an accumulated exception is not cleared >> 158: env->ExceptionCheck(); > > So, this doesn't actually do anything but avoids JNI warnings, does it? > > `AwtDebugSupport::AssertCallback` can be called *at any time*, hence calling > JNI functions here is unsafe. Adding `env->ExceptionCheck()` doesn't change > anything. Yes. However, it's "only" in the assertion callback that only exists in debug VMs. And an original exception isn't lost. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/17404#discussion_r1472348927
