Commit 0c542367 authored by Jinsuk Kim's avatar Jinsuk Kim Committed by Commit Bot

Fix a potential crash in Android upon CVC.onAttachedToWindow

This fix a potential bug that can happen, based on the crash report
https://crbug.com/803244. It was not taken into account when landing
https://crrev.com/c/867177.

Bug: 803244
Change-Id: I99c4d927cc69567efae619622ce8baf434cc332b
Reviewed-on: https://chromium-review.googlesource.com/874976
Commit-Queue: Jinsuk Kim <jinsukkim@chromium.org>
Reviewed-by: default avatarBo <boliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#530419}
parent d66e0d95
...@@ -588,10 +588,12 @@ public class ContentViewCoreImpl implements ContentViewCore, DisplayAndroidObser ...@@ -588,10 +588,12 @@ public class ContentViewCoreImpl implements ContentViewCore, DisplayAndroidObser
public void onAttachedToWindow() { public void onAttachedToWindow() {
mAttachedToWindow = true; mAttachedToWindow = true;
addDisplayAndroidObserverIfNeeded(); addDisplayAndroidObserverIfNeeded();
if (mWebContents != null) updateTextSelectionUI(true); if (mWebContents != null) {
updateTextSelectionUI(true);
getImeAdapter().onViewAttachedToWindow();
}
GamepadList.onAttachedToWindow(mContext); GamepadList.onAttachedToWindow(mContext);
mSystemCaptioningBridge.addListener(this); mSystemCaptioningBridge.addListener(this);
getImeAdapter().onViewAttachedToWindow();
mWebContentsAccessibility.onAttachedToWindow(); mWebContentsAccessibility.onAttachedToWindow();
} }
......
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