Commit 569e6686 authored by Liquan (Max) Gu's avatar Liquan (Max) Gu Committed by Commit Bot

[PaymentHandler] Don't close UI on iframe loading fails

Context:
Having iframe navigating multiple times would make the payment handler
WebContents invokes the "didFailLoad" callback. Currently, didFailLoad
applies for both the mainframe and subframes. The UI shouldn't close
when the load failure happens on subframes.

Before:
The UI closes when the subframes fail to load.

After:
The UI doesn't close when the subframes fail to load.

Bug: 1137929

Change-Id: Iaba361e895d6bb4e46b0fb969a87958e9daebe57
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2469536Reviewed-by: default avatarSahel Sharify <sahel@chromium.org>
Commit-Queue: Liquan (Max) Gu <maxlg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#818316}
parent 18016334
......@@ -270,6 +270,7 @@ import java.lang.annotation.RetentionPolicy;
// Implement WebContentsObserver:
@Override
public void didFailLoad(boolean isMainFrame, int errorCode, String failingUrl) {
if (!isMainFrame) return;
mHandler.post(() -> {
mCloseReason = CloseReason.FAIL_LOAD;
mHider.run();
......
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