[Android, Crash] Prevent Accessory trying to send data too early
There is a nullptr exception connected to SendViewItems. This CL guesses a solution to this problem: 1. It's only called if the controller was checked to be null, so it must be in the implementation. 2. The view_ is synchronously constructed at construction time and can outside of tests never be null. 3. It's bound to web_contents_, so this also cannot be null. The only dereference left is the GetFocusedFrame() method which can be null. Therefore, accessing the correct frame moves to the driver-side which is much more appropriate for frame-based actions anyway. Bug: 865447 Change-Id: Ie5ea7aed980cdf53e784e5d918a9d54717ad6ab1 Reviewed-on: https://chromium-review.googlesource.com/1143477Reviewed-by:Vasilii Sukhanov <vasilii@chromium.org> Commit-Queue: Friedrich Horschig <fhorschig@chromium.org> Cr-Commit-Position: refs/heads/master@{#577496}
Showing
Please register or sign in to comment