• Colin Blundell's avatar
    [WebLayer] Destroy Profile in WebLayer Shell · be1dc13b
    Colin Blundell authored
    This CL has WebLayer Shell destroy its Profile at the point in the
    shutdown process where Chrome destroys its Profile. This change is
    concretely needed to enable the upcoming bringup of KeyedServices in
    WebLayer; without this change, the KeyedServiceFactory singletons
    DCHECK when they are destroyed at shutdown as they expect the context
    shutdown (i.e., BrowserContext destruction) to have already occurred.
    
    As part of this change we change session_service_browsertest.cc to
    delete the Tab objects that were created by session restore. These
    objects currently leak when not on Android, and a DCHECK deep in
    //content goes off with this CL without this part of the change (that
    DCHECK effectively expects that WebContents instances associated with
    a BrowserContext instance are destroyed before the BrowserContext). I
    have filed a bug for considering the long-term ownership model around
    BrowserImpl::CreateTabForSessionRestore().
    
    Bug: 1030692
    Change-Id: I62bfd73e5e4d9d1099e18fc66cdd51d7380497c6
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2025367
    Commit-Queue: Colin Blundell <blundell@chromium.org>
    Reviewed-by: default avatarScott Violet <sky@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#736294}
    be1dc13b
main.h 1.14 KB