• Scott Violet's avatar
    weblayer: adds support for minimal persistence to Java side · b7df9d6e
    Scott Violet authored
    This required some shuffling around to get things to work right.
    In particular, prior to this patch I had restore triggered
    from the browser_impl.cc's constructor. This proves problematic on
    android now as tabs may be created synchronously. When BrowserImpl.java
    calls to browser_impl.cc's constructor all the connections (clients)
    haven't been set up (and BrowserImpl.java can't call to the native side,
    because it's waiting for the return value from creation). This lead to
    all sorts of crashes and what not.
    
    The fix is to trigger restore later on, and specifically once everything
    has been wired up, which is when setClient() is called.
    
    BUG=1046406
    TEST=BrowserFragmentLifecycleTest
    
    Change-Id: Iee2dfcab5ab8b45371099b33b65aa35ffb458ce4
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2031594Reviewed-by: default avatarEvan Stade <estade@chromium.org>
    Commit-Queue: Scott Violet <sky@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#737341}
    b7df9d6e
browser_impl.cc 11.7 KB