NPE from accessing WebContentsUserData |
||
Issue descriptionthe clusterfuzz report (https://clusterfuzz.com/testcase?key=4608926788878336) contains a Java exception: java.lang.NullPointerException: Attempt to invoke virtual method 'java.util.Map org.chromium.content.browser.webcontents.WebContentsImpl.getUserDataMap()' on a null object reference at org.chromium.content.browser.webcontents.WebContentsUserData.fromWebContents(WebContentsUserData.java:5) at org.chromium.content.browser.selection.SelectionPopupControllerImpl.fromWebContents(SelectionPopupControllerImpl.java:19) at org.chromium.content.browser.ContentViewCoreImpl.destroyPastePopup(ContentViewCoreImpl.java:577) at org.chromium.content.browser.ContentViewCoreImpl$ContentGestureStateListener.onSingleTap$51D2ILG_0(ContentViewCoreImpl.java:17) at org.chromium.content.browser.GestureListenerManagerImpl.onSingleTapEventAck(GestureListenerManagerImpl.java:38) There have been many other instances like this. In addition to resolving the particular instance reported through clusterfuzz, overall access to WebContentsUserData-backed object should be examined, and if possible, figure out a good way (maybe better than excessive null checking) to avoid future exceptions.
,
Feb 14 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/fc5ff80f49b12b9eddc0334914081bcb496fd00e commit fc5ff80f49b12b9eddc0334914081bcb496fd00e Author: Jinsuk Kim <jinsukkim@chromium.org> Date: Wed Feb 14 06:43:46 2018 Fix NPE in processing gesture ack events GestureListenerManager should stop receiving gesture ack events from native if ContentViewCore is in the destroyed state. This CL disconnects the link between native and Java side of GestureListenerManagerImpl when that happens. Bug: 803244, 810179 Change-Id: If414dbd44e008fc3b4196d04c13838bc682d49b7 Reviewed-on: https://chromium-review.googlesource.com/915321 Reviewed-by: Bo <boliu@chromium.org> Commit-Queue: Jinsuk Kim <jinsukkim@chromium.org> Cr-Commit-Position: refs/heads/master@{#536666} [modify] https://crrev.com/fc5ff80f49b12b9eddc0334914081bcb496fd00e/content/browser/android/gesture_listener_manager.cc [modify] https://crrev.com/fc5ff80f49b12b9eddc0334914081bcb496fd00e/content/browser/android/gesture_listener_manager.h [modify] https://crrev.com/fc5ff80f49b12b9eddc0334914081bcb496fd00e/content/public/android/java/src/org/chromium/content/browser/ContentViewCoreImpl.java [modify] https://crrev.com/fc5ff80f49b12b9eddc0334914081bcb496fd00e/content/public/android/java/src/org/chromium/content/browser/GestureListenerManagerImpl.java
,
Feb 18 2018
|
||
►
Sign in to add a comment |
||
Comment 1 by bugdroid1@chromium.org
, Feb 12 2018