• erikchen's avatar
    macOS: Let reserved keyEquivalents bypass the main menu. · 3be9df1c
    erikchen authored
    The main menu has a built-in 100ms delay. Combined with higher priority for
    incoming NSEvents compared to chrome tasks, holding down key equivalents [e.g.
    cmd + w] starves the chrome task queue. The implementation of tab-closing
    requires the main thread to process the on unload ACK from the renderer before
    closing the tab [which is a chrome task], so this causes a live-lock.
    
    This CL lets reserved keyEquivalents bypass the main menu. This avoids the
    live-lock indicated above. This also loses the built-in 100ms throttle, so this
    CL adds a custom 50ms throttle [disabled in tests].
    
    Bug: 836947
    Change-Id: Idb88ee84d7aa82da4104893ed85358c75e385ea3
    Reviewed-on: https://chromium-review.googlesource.com/1108095
    Commit-Queue: Erik Chen <erikchen@chromium.org>
    Reviewed-by: default avatarNico Weber <thakis@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#569285}
    3be9df1c
chrome_command_dispatcher_delegate.mm 7.93 KB