Commit f5c35191 authored by Laís Minchillo's avatar Laís Minchillo Committed by Commit Bot

[aw] Fix crash when VisualStateCallback is null

This CL fixes a crash when a null VisualStateCallback is passed to
postVisualStateCallback. Since there is no action to do if the callback
is null, just return early.

Bug: 1014924
Change-Id: I891eda56bd884af5b2d7e1cb909895cb5fdd6a98
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1865155Reviewed-by: default avatarTobias Sargeant <tobiasjs@chromium.org>
Commit-Queue: Laís Minchillo <laisminchillo@chromium.org>
Auto-Submit: Laís Minchillo <laisminchillo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#706438}
parent d6a3dedf
......@@ -958,6 +958,7 @@ class WebViewChromium implements WebViewProvider, WebViewProvider.ScrollDelegate
public void insertVisualStateCallback(
final long requestId, final VisualStateCallback callback) {
sWebViewApiCallSample.record(ApiCall.INSERT_VISUAL_STATE_CALLBACK);
if (callback == null) return;
mSharedWebViewChromium.insertVisualStateCallback(
requestId, new AwContents.VisualStateCallback() {
@Override
......
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