• Jinsuk Kim's avatar
    Android: Fix assertion failure in RWHVA destruction · 89a2cd44
    Jinsuk Kim authored
    Assertion at RenderWidgetHostViewAndroid::StopObservingRootWindow
    called via |Destroy| failed, since WebContentsViewAndroid::SetContentViewCore
    was passing a valid ViewAndroid instead of nullptr when cvc is destroyed.
    This kept RWHVA observing root window, while the view tree was already
    torn down by WCVA dtor, leaving RWHVA in inconsistent state where it
    couldn't get WindowAndroid any more. This CL fixes the bug. Previously
    WCVA passed null CVC to RWHVA before https://crrev.com/c/958646, so
    this fix is the correct behavior.
    
    Bug: 828211
    Change-Id: I79463cd0dce94c5f8d81417208cd313871c4f5d7
    Reviewed-on: https://chromium-review.googlesource.com/991002Reviewed-by: default avatarBo <boliu@chromium.org>
    Commit-Queue: Jinsuk Kim <jinsukkim@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#548308}
    89a2cd44
web_contents_view_android.cc 18.9 KB