RFR: 8348106: Catch C++ exception in Java_sun_awt_windows_WTaskbarPeer_setOverlayIcon [v5]
Alexander Zvegintsev
azvegint at openjdk.org
Sat Feb 22 01:37:01 UTC 2025
On Fri, 21 Feb 2025 16:29:08 GMT, Rajat Mahajan <rmahajan at openjdk.org> wrote:
>> **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
Marked as reviewed by azvegint (Reviewer).
-------------
PR Review: https://git.openjdk.org/jdk/pull/23470#pullrequestreview-2634579956
More information about the client-libs-dev
mailing list