• Scott Violet's avatar
    favicons: fix manifest crash · 56992081
    Scott Violet authored
    This crash happens under the following circumstances:
    1. on android.
    2. request manifest from WebContents.
    3. ~WebContentsImpl
    
    As part of WebContentsImpl deletion any outstanding requests for
    manifests are run. The callback scheduled at 2 may trigger running
    code in ContentFaviconDriver that attempts to use web_contents().
    Problem is at this time WebContentsImpl has already set the
    web_contents() of ContentFaviconDriver to null, and we crash.
    
    Fix is to route the callback to ContentFaviconDriver and have
    ContentFaviconDriver do nothing if web_contents() is null.
    
    BUG=1114237
    TEST=ContentFaviconDriverTest.WebContentsDeletedWithInProgressManifestRequest
    
    Change-Id: I0e88884c1ea7a8ffacb443b65ba09786cf4f54c2
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2343718Reviewed-by: default avatarPeter Kotwicz <pkotwicz@chromium.org>
    Commit-Queue: Scott Violet <sky@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#796889}
    56992081
content_favicon_driver.cc 9 KB