Commit fb429719 authored by Jinsuk Kim's avatar Jinsuk Kim Committed by Commit Bot

Android: Guard against crashes due to accessing invalid objects

The reported crashes likely come from accessing objects in
WebContents when it's on the way to destruction. Adds a check to
ensure it won't attempt to access objects that already become invalid.

Bug: 788278
Change-Id: I8d4ef4907c73a93ac4d6d12e78540bbbbfbae08e
Reviewed-on: https://chromium-review.googlesource.com/1027170
Commit-Queue: Jinsuk Kim <jinsukkim@chromium.org>
Reviewed-by: default avatarBo <boliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#553808}
parent 629feafa
......@@ -685,6 +685,7 @@ public class WebContentsImpl implements WebContents, RenderFrameHostDelegate {
* Removes handles used in text selection.
*/
public void dismissTextHandles() {
if (isDestroyed()) return;
nativeDismissTextHandles(mNativeWebContentsAndroid);
}
......
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