• Sahel Sharify's avatar
    [Payments] Fix DCHECK triggered by cluster-fuzz test case. · d341822b
    Sahel Sharify authored
    The DCHECK happens when PaymentRequestState::OnDoneCreatingPaymentApps()
    gets called after the merchant has called Abort(), and no supported
    method exists. This is because the supported method callback which gets
    called inside OnDoneCreatingPaymentApps() tries to set a NotShownReason
    after the Abort() call which has already set the AbortReason.
    
    In this cl the state_ gets notified about Abort() calls, and clears
    the pending (if any) supported method call back on abort.
    
    A test will be added in a follow up cl to test abort() call before
    OnDoneCreatingPaymentApps() once cross platform payment app factory is
    ready (crbug.com/1054115)
    
    Bug: 1040194
    Change-Id: I8985fd805df05e656b271e4dac4bb4d20a7fb045
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2065049Reviewed-by: default avatarSahel Sharify <sahel@chromium.org>
    Reviewed-by: default avatarRouslan Solomakhin <rouslan@chromium.org>
    Commit-Queue: Sahel Sharify <sahel@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#742807}
    d341822b
payment_request_state.cc 23.6 KB