Bug 189249

Summary: [Payment Request] PaymentResponse should have an onpayerdetailchange event handler
Product: WebKit Reporter: Andy Estes <aestes>
Component: New BugsAssignee: Andy Estes <aestes>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, andersca, cdumez, commit-queue, dbates, esprehn+autocc, ews-watchlist, kangil.han, kondapallykalyan, rniwa, sam, thorton, webkit-bug-importer, wenson_hsieh, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Andy Estes 2018-09-03 13:55:02 PDT
[Payment Request] PaymentResponse should have an onpayerdetailchange event handler
Comment 1 Andy Estes 2018-09-03 13:57:08 PDT Comment hidden (obsolete)
Comment 2 Alex Christensen 2018-09-04 11:06:02 PDT
Comment on attachment 348790 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=348790&action=review

> Source/WebCore/Modules/paymentrequest/PaymentResponse.cpp:57
> +    return static_cast<ActiveDOMObject&>(m_request.get()).scriptExecutionContext();

You shouldn't need the static cast here.  Just m_request->scriptExecutionContext() ought to work.
Comment 3 Andy Estes 2018-09-04 11:10:09 PDT
Comment on attachment 348790 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=348790&action=review

>> Source/WebCore/Modules/paymentrequest/PaymentResponse.cpp:57
>> +    return static_cast<ActiveDOMObject&>(m_request.get()).scriptExecutionContext();
> 
> You shouldn't need the static cast here.  Just m_request->scriptExecutionContext() ought to work.

Unfortunately not, because PaymentRequest overrides scriptExecutionContext() as a private member function. I guess I could change that to be public, or make PaymentResponse be a ContextDestructionObserver. I'll think about how I want to improve this.

Thanks for reviewing!
Comment 4 WebKit Commit Bot 2018-09-04 11:22:07 PDT Comment hidden (obsolete)
Comment 5 Andy Estes 2018-09-04 11:37:06 PDT
Created attachment 348833 [details]
Patch
Comment 6 WebKit Commit Bot 2018-09-04 12:14:30 PDT
Comment on attachment 348833 [details]
Patch

Clearing flags on attachment: 348833

Committed r235625: <https://trac.webkit.org/changeset/235625>
Comment 7 WebKit Commit Bot 2018-09-04 12:14:32 PDT
All reviewed patches have been landed.  Closing bug.
Comment 8 Radar WebKit Bug Importer 2018-09-04 12:15:21 PDT
<rdar://problem/44107683>