RFR: 8282862: AwtWindow::SetIconData leaks old icon handles if an exception is detected [v6]

Rajat Mahajan rmahajan at openjdk.org
Fri Jan 17 23:39:38 UTC 2025


On Fri, 17 Jan 2025 22:40:09 GMT, Phil Race <prr at openjdk.org> wrote:

>> Rajat Mahajan has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   check using not equal to NULL to match the rest of the code in the function
>
> src/java.desktop/windows/native/libawt/windows/awt_Window.cpp line 2115:
> 
>> 2113:     HICON hNewIcon = NULL;
>> 2114:     HICON hNewIconSm = NULL;
>> 2115: 
> 
> I presume we know for sure there's no exception pending when we enter ?
> Looking at the only caller, it seems probable.

Are you suggesting we add a JNU_CHECK_EXCEPTION the beginning of the function? , as I don't think we know for sure there is an exception pending or not at this point.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/22932#discussion_r1920874523


More information about the client-libs-dev mailing list