<AWT Dev> Review a fix for List leak

artem malinko artem.malinko at oracle.com
Mon Jun 30 10:17:21 UTC 2014


Thank you, Anthony.

Yes, I think assertion won't be superfluous to prevent other bugs of 
same type. Here is a version with assert.

http://cr.openjdk.java.net/~mcherkas/artem/webrev.02/

On 27.06.2014 1:12, Anthony Petrov wrote:
> Hi Artem,
>
> Please configure you code editor so that it formats the code that you 
> modify according to Java code conventions used in OpenJDK (4-spaces 
> line indentation, a space after "if" and before "{", etc.)
>
> Also, please include the bug id and synopsis to the subject line of 
> your review requests. Please see other review threads on this mailing 
> list for examples.
>
> As for the fix itself, should we add an assertion check to the 
> CreateHWnd() method to verify that both peer and m_peerObject refer to 
> the same Java object in case the latter is already set?
>
> -- 
> best regards,
> Anthony
>
> On 6/26/2014 7:30 PM, artem malinko wrote:
>> Hello, AWT Team.
>>
>> Please review a fix for the issue:
>> https://bugs.openjdk.java.net/browse/JDK-8040076
>> The fix is available at:
>> http://cr.openjdk.java.net/~mcherkas/artem/webrev.01/
>>
>> When method "void AwtList::SetMultiSelect" is invoked it invokes "void
>> AwtComponent::CreateHWnd" where m_peerObject initialized. But at this
>> stage m_peerObject already initialized and already holds ref to java
>> List object. So original m_peerObject is lost and ref to java List lost
>> as well. In the fix I've added check whether m_peerObject is initialized
>> or not.
>>
>> Thank you.



More information about the awt-dev mailing list