RESOLVED FIXED 182631
[Payment Request] Crash in PaymentRequest::canMakePayment() when Apple Pay payment method data is missing required fields
https://bugs.webkit.org/show_bug.cgi?id=182631
Summary [Payment Request] Crash in PaymentRequest::canMakePayment() when Apple Pay pa...
Andy Estes
Reported 2018-02-08 17:01:14 PST
[Payment Request] Crash in PaymentRequest::canMakePayment() when Apple Pay payment method data is missing required fields
Attachments
Patch (6.85 KB, patch)
2018-02-08 17:15 PST, Andy Estes
no flags
Patch (6.84 KB, patch)
2018-02-09 09:59 PST, Andy Estes
no flags
Andy Estes
Comment 1 2018-02-08 17:15:18 PST
Mark Lam
Comment 2 2018-02-08 17:20:50 PST
Comment on attachment 333435 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=333435&action=review r=me with suggestions. > Source/WebCore/ChangeLog:16 > + release assertion is raised about there being an unexpected exception in the VM. I suggest /being/seeing/. > Source/WebCore/Modules/paymentrequest/PaymentRequest.cpp:493 > + auto scope = DECLARE_CATCH_SCOPE(document.execState()->vm()); Is there a reason to put the CatchScope in here instead of at the top of the function? As a convention, the only time we should declare it in this local scope is if there are parts of this function outside of this scope that can throw exceptions. Is that true? If not, I suggest moving this declaration to the top of the function.
Andy Estes
Comment 3 2018-02-08 17:24:49 PST
(In reply to Mark Lam from comment #2) > Comment on attachment 333435 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=333435&action=review > > Is there a reason to put the CatchScope in here instead of at the top of the > function? As a convention, the only time we should declare it in this local > scope is if there are parts of this function outside of this scope that can > throw exceptions. Is that true? If not, I suggest moving this declaration > to the top of the function. I was just being conservative. I wasn't sure if it was ok to call clearException() more than once on the same CatchScope. Now that I look more closely, I see that clearException() just calls through to the VM, so this must be ok. I'll move the scope outside the loop. Thanks for reviewing!
Andy Estes
Comment 4 2018-02-08 17:27:01 PST
(And no, nothing outside the loop throws)
Andy Estes
Comment 5 2018-02-09 09:59:23 PST
WebKit Commit Bot
Comment 6 2018-02-09 11:07:34 PST
Comment on attachment 333497 [details] Patch Clearing flags on attachment: 333497 Committed r228331: <https://trac.webkit.org/changeset/228331>
WebKit Commit Bot
Comment 7 2018-02-09 11:07:35 PST
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 8 2018-02-09 11:09:33 PST
Note You need to log in before you can comment on or make changes to this bug.