Chromium Code Reviews
DescriptionFixes crash in closing menus. There are two issues here:
. How quick we quit the nested message loop. Previously I relied on
the Dispatcher to exit the nested message loop. The problem with this is
that the Dispatcher is only invoked before native events, so that
it's entirely possible for the Widget::CloseNow task to be processed
before the Dispatcher as invoked again. I've changed to use
MessageLoop::QuitNow which makes it so the MessageLoop won't process
any more messages and will pop out of the dispatcher.
. Owned windows are only destroyed when the parent itself is
destroyed. Because the mouse event to show the menu originates from
the parent this means by the time we pop from the nested message
loop the parent Widget and Views have been deleted and we
crash. I've plumbed through notification that an owned parent is
closing (really Hide()ing, but Hide() pretty much means we're
going to Close), so that menu can exit the nested message loop
before the owned parent is destroyed. This is only necessary on
Windows as we handled owned windows slightly differently under
aura.
BUG=124123
64303
TEST=none
R=ben@chromium.org
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=134108
Patch Set 1 #Patch Set 2 : fixor #
Total comments: 6
Patch Set 3 : OnOwnerClosing and more comments #
Total comments: 2
Messages
Total messages: 9 (0 generated)
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||