<AWT Dev> Code Review Request for CR 7145980 - Dispose method of window.java takes long
Anthony Petrov
anthony.petrov at oracle.com
Wed Feb 22 05:26:24 PST 2012
Hi Oleg,
The correct link to the webrev should be
http://cr.openjdk.java.net/~bagiras/7145980/webrev/
Anyways, I suggest to make isMixingNeeded() return false if the
containing window (a reference to which is already obtained in that
method) is currently disposing. This way we avoid a double call to
getContainingWindow(), and also will prevent any other mixing-related
code from execution when the window is being disposed.
In Window.java I suggest to use the following pattern:
disposing = true;
try {
// do stuff
} finally {
disposing = false;
}
to ensure we don't leave the flag in 'true' state if some exceptions are
thrown.
--
best regards,
Anthony
On 2/22/2012 4:57 PM, Oleg Pekhovskiy wrote:
> Hi guys,
>
> Please review the fix for CR:
> http://bugs.sun.com/view_bug.do?bug_id=7145980
>
> webrev:
> http://cr.openjdk.java.net/~bagiras/7145980/webrev/
> <http://cr.openjdk.java.net/%7Edenis/7143070/webrev.04/>
>
> The main idea is to skip recalculation of component visible region when
> a top-level window is disposing.
>
> Thanks,
> Oleg
More information about the awt-dev
mailing list