Commit b17f4309 authored by Evan Stade's avatar Evan Stade Committed by Commit Bot

WebLayer: Modify assert during modal dialog dismissal.

Bug: 1125860
Change-Id: I1aa892bad4b66a8518076244025f6fbafcf9b518
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2399403Reviewed-by: default avatarScott Violet <sky@chromium.org>
Commit-Queue: Evan Stade <estade@chromium.org>
Cr-Commit-Position: refs/heads/master@{#805332}
parent 736fcf50
...@@ -299,9 +299,11 @@ public final class BrowserViewController ...@@ -299,9 +299,11 @@ public final class BrowserViewController
private void onDialogVisibilityChanged(boolean showing) { private void onDialogVisibilityChanged(boolean showing) {
if (WebLayerFactoryImpl.getClientMajorVersion() < 82) return; if (WebLayerFactoryImpl.getClientMajorVersion() < 82) return;
// This should never be called when |mTab| is null.
assert mTab != null;
if (mModalDialogManager.getCurrentType() == ModalDialogType.TAB) { if (mModalDialogManager.getCurrentType() == ModalDialogType.TAB) {
// This shouldn't be called when |mTab| is null and the modal dialog type is TAB. OTOH,
// when an app-modal is displayed for a javascript dialog, this method can be called
// after the tab is destroyed.
assert mTab != null;
try { try {
mTab.getClient().onTabModalStateChanged(showing); mTab.getClient().onTabModalStateChanged(showing);
} catch (RemoteException e) { } catch (RemoteException e) {
......
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