Commit 852a838e authored by Jinsuk Kim's avatar Jinsuk Kim Committed by Commit Bot

[ThinWebView] Make sure ContentView is detached upon TWV destruction

ContentView was not being removed together with WebContents wrapped
in ThinWebView. This CL makes sure to remove it from the view
hierarchy.

Bug: 1080552
Change-Id: I54c81d8c0b67b35340af0a875c671d4bdd119599
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2212240Reviewed-by: default avatarShakti Sahu <shaktisahu@chromium.org>
Commit-Queue: Jinsuk Kim <jinsukkim@chromium.org>
Cr-Commit-Position: refs/heads/master@{#772557}
parent 1dbf5a77
...@@ -77,6 +77,10 @@ public class ThinWebViewImpl extends FrameLayout implements ThinWebView { ...@@ -77,6 +77,10 @@ public class ThinWebViewImpl extends FrameLayout implements ThinWebView {
@Override @Override
public void destroy() { public void destroy() {
if (mNativeThinWebViewImpl == 0) return; if (mNativeThinWebViewImpl == 0) return;
if (mContentView != null) {
removeView(mContentView);
mContentView = null;
}
mCompositorView.destroy(); mCompositorView.destroy();
ThinWebViewImplJni.get().destroy(mNativeThinWebViewImpl, ThinWebViewImpl.this); ThinWebViewImplJni.get().destroy(mNativeThinWebViewImpl, ThinWebViewImpl.this);
mNativeThinWebViewImpl = 0; mNativeThinWebViewImpl = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment