• Evan Stade's avatar
    Fix CollectedCookiesView crash. · cd10c5b3
    Evan Stade authored
    CollectedCookiesViews::CreateAndShowForWebContents may be called
    while an existing dialog (widget) is in the process of closing. In
    this case, exit gracefully instead of crashing.
    
    The only way I can think of that might be possible to repro this
    IRL (i.e. aside from clusterfuzz) would be to:
    a) open page info bubble
    b) click "cookies"
    c) open page info bubble again
    d) click "cookies", then focus cookies dialog, press escape,
       all in rapid succession
    e) cookies dialog starts closing
    f) click on "cookies" is a posted task, and is handled after
       cookies dialog starts closing, but before finishing closing
    
    This is probably exceedingly rare, enough so that it's not worth
    being concerned with re-opening the cookies dialog. (And arguably,
    it shouldn't re-open anyway, since the last command the user issued
    was "escape" (close).)
    
    Bug: 989888
    Change-Id: Ic4e3274128f5530b621d9dfe4e99dd6d24bddc21
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1731914Reviewed-by: default avatarScott Violet <sky@chromium.org>
    Commit-Queue: Evan Stade <estade@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#683396}
    cd10c5b3
collected_cookies_views_browsertest.cc 3.88 KB