RFR: 8348106: Catch C++ exception in Java_sun_awt_windows_WTaskbarPeer_setOverlayIcon [v5]
Rajat Mahajan
rmahajan at openjdk.org
Fri Feb 21 16:29:08 UTC 2025
> **Issue:**
> The JNI method `Java_sun_awt_windows_WTaskbarPeer_setOverlayIcon `calls `CreateIconFromRaster `that can throw a C++ exception.
>
> The C++ exception must be caught and must not be allowed to escape the JNI method. The call to `CreateIconFromRaster `has to wrapped into a try-catch block.
>
> **Solution:**
>
> Added exception handling to make sure any exception from `CreateIconFromRaster `is handled properly.
>
> Testing done.
Rajat Mahajan has updated the pull request incrementally with one additional commit since the last revision:
use Macros TRY CATCH_BAD_ALLOC
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/23470/files
- new: https://git.openjdk.org/jdk/pull/23470/files/5a7cd348..ffc83d76
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=23470&range=04
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=23470&range=03-04
Stats: 8 lines in 1 file changed: 0 ins; 1 del; 7 mod
Patch: https://git.openjdk.org/jdk/pull/23470.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/23470/head:pull/23470
PR: https://git.openjdk.org/jdk/pull/23470
More information about the client-libs-dev
mailing list