New issue
Advanced search Search tips

Issue 728641 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Dec 10
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug



Sign in to add a comment

PaymentRequestImpl.setAborted() has incorrect assert mWasShowCalled.

Project Member Reported by rouslan@chromium.org, Jun 1 2017

Issue description

It's possible to hit trigger "assert mWasShowCalled" in PaymentRequestImpl.setAborted() via the following steps:

1) Open https://rsolomakhin.github.io/pr/.
2) Wait for the text "Can make payment" to appear.
3) Refresh the page.

Seeing "Can make payment" text means that a PaymentRequestImpl instance was created and PaymentRequestImpl.init() was called and has set mClient to non-null value. Refreshing the page will call PaymentRequestImpl.close(). PaymentRequestImpl.close() will call PaymentRequestImpl.setAborted(). Because PaymentRequestImpl.show() was never called, the mShowWasCalled variable will be false. This triggers the assertion failure.
 

Comment 1 by se...@chromium.org, Jun 1 2017

Status: Started (was: Assigned)
Project Member

Comment 2 by bugdroid1@chromium.org, Jun 1 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1cd2c85e634da2d19943d5615c7ab260286b5b0b

commit 1cd2c85e634da2d19943d5615c7ab260286b5b0b
Author: sebsg <sebsg@chromium.org>
Date: Thu Jun 01 18:50:35 2017

[Payments] Remove assert of mWasShowCalled in SetAborted method.

It's possible for the PaymentRequest to be aborted before the show. For
example if CanMakePayment returns false, the merchant can close the
Payment Request.

Bug:  728641 
Change-Id: Ie1c770a1f8fdceb6012f6eccf8dad6b286794382
Reviewed-on: https://chromium-review.googlesource.com/521742
Commit-Queue: Sebastien Seguin-Gagnon <sebsg@chromium.org>
Commit-Queue: Rouslan Solomakhin <rouslan@chromium.org>
Reviewed-by: Rouslan Solomakhin <rouslan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#476371}
[modify] https://crrev.com/1cd2c85e634da2d19943d5615c7ab260286b5b0b/chrome/android/java/src/org/chromium/chrome/browser/payments/JourneyLogger.java

Components: -UI>Browser>Autofill>Payments UI>Browser>Payments
Has this been fixed?
Status: Fixed (was: Started)

Sign in to add a comment