android: Throw if WebContentsImpl is used after destroy
Right now the trend is to just add a null check every time there is a crash in native code. I'm going to reverse this by putting all remaining WebContentsImpl native calls behind an IllegalStateException check. Then we'll know exactly what code is causing these exceptions, and fix the client code accordingly. Inspired by crbug.com/901130 although this is not directly relevant. Change-Id: I444b912db01567925b6f662d2c11267d60e54624 Reviewed-on: https://chromium-review.googlesource.com/c/1324992Reviewed-by:Ted Choc <tedchoc@chromium.org> Commit-Queue: Bo <boliu@chromium.org> Cr-Commit-Position: refs/heads/master@{#606303}
Showing
Please register or sign in to comment