• Mikel Astiz's avatar
    Fix mac pumps potentially doing nothing in DoRun() · cfa89ca5
    Mikel Astiz authored
    Prior to this patch, DoRun() in MessagePumpNSRunLoop and
    MessagePumpNSApplication didn't handle well the case where keep_running_
    is initially false.
    
    This situation reproduces in the convoluted scenario of deferred quits
    that involve yet another nested loop being started exactly between the
    quit request and its deferred execution, which is actually exercised in
    some browser tests.
    
    The proposed solution mimics what other analogous pumps do.
    
    Bug: 787551
    Change-Id: Ida8c93f9bc189477e5ad16f86e88ac1613160ba2
    Reviewed-on: https://chromium-review.googlesource.com/782563Reviewed-by: default avatarMike Pinkerton <pinkerton@chromium.org>
    Reviewed-by: default avatarMark Mentovai <mark@chromium.org>
    Commit-Queue: Mikel Astiz <mastiz@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#521709}
    cfa89ca5
message_pump_mac.mm 35 KB