• Balazs Engedy's avatar
    Suppress permission prompts for detached WebContents. · 970988a3
    Balazs Engedy authored
    If the active WebContents has a pending permission prompt when its
    renderer crashes, and then the user closes the WebContents, the
    following sequence of events takes place:
     1) The WebContents is detached from the Browser.
     2) This causes the WebView's crash overlay view to get torn down, and to
        make sure hit testing continues to work correctly on Mac, the hosted
        WebContents is made visible again temporarily.
     3) This triggers the PermissionRequestManager, which has pending requests,
        to show the prompt bubble again, but at this point there is no
        BrowserView to anchor the prompt to.
    
    Make sure we silently suppress the prompt in step (3) as a quick fix.
    
    Bug: 933321
    Change-Id: If8dbf09e1faae33fc615e7a6117c155d5f8707c4
    TBR: raymes@chromium.org
    Reviewed-on: https://chromium-review.googlesource.com/c/1489245
    Commit-Queue: Balazs Engedy <engedy@chromium.org>
    Reviewed-by: default avatarKamila Hasanbega <hkamila@google.com>
    Cr-Commit-Position: refs/heads/master@{#635975}
    970988a3
permission_request_manager_browsertest.cc 22.6 KB