Skip to content
  • Trent Apted's avatar
    Mac: Don't crash trying to process a menu command during shutdown. · 45d9ae2d
    Trent Apted authored
    When something calls chrome::AttemptExit(), lots of stuff happens.
    It involves RunLoops, and there's no guarantee the OS won't put
    something into the event queue while Chrome is cleaning up the last
    browser window.
    
    If that "something" is "Open a New Window" BrowserProcessImpl::Pin()
    gets unhappy and will CHECK() because it thought the last browser
    window was already closed.
    
    To fix, don't allow AppController to process commands after it has
    cleared its keep alive. Since, this may trigger BrowserProcessImpl::UnPin()
    and enter this state where it's prohibited to open new windows.
    
    Bug: 779829
    Change-Id: I4ac2533d27ed724bc24cf546be69560506705cb8
    Reviewed-on: https://chromium-review.googlesource.com/752981
    
    
    Commit-Queue: Trent Apted <tapted@chromium.org>
    Reviewed-by: default avatarRobert Sesek <rsesek@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#515338}
    45d9ae2d