Description[Closing in favor of http://codereview.chromium.org/362013 ]
[Mac] Do not pump nested tasks in -[NSApp sendEvent:].
Renderers can cause UI state changes which can badly break modal event loops. For instance, if a tab closes while the user is selecting a context-menu item relating to that tab, the app can crash. When the tab-content right-click menu is up, nested tasks are not pumped. This change causes modal event loops in other areas of the UI to work the same way.
The downside of this change is that Chrome events are no longer pumped in modal event loops. This means that if a context menu is up, animations and other updates will not happen, in any tab in any window. This is sad, but not as sad as sometimes crashing all tabs in all windows. This includes plug-ins, so video will pause while in a context menu (this was already true of tab content context menus).
Examples of problem cases:
- Last tab in a window closes while dragging the window.
- Last tab in a window closes while bookmark bar context menu visible.
- Last tab in a window closes while download shelf context menu visible.
- Tab closes while dragging a link over the tab.
- Tab closes while dragging a link from the tab.
- Tab closes while back/forward context menu is open.
- Tab closes while click-hold in the tab's close button.
- Tab closes while closing info bar.
- Tab closes while tab context menu is visible.
- Probably more I'm not aware of.
Many of these cases also have poor interactions with alert() panels breaking into the modal loop. For instance, if you were in a context menu and an alert() pops up on a different window.
This CL removes previous fix for issues 25462 and 25465.
BUG=25463, 25462, 25465, 25556, 26135, 26136, 25467, 25463
TEST=See bugs for repro cases.
Patch Set 1 #
Total comments: 5
Patch Set 2 : Mentovai's suggestions. #
Total comments: 3
Patch Set 3 : More tweaking of that other person's comments. #
Total comments: 2
Messages
Total messages: 9 (0 generated)
|