Title: [273297] trunk/Source/WebKit
- Revision
- 273297
- Author
- [email protected]
- Date
- 2021-02-22 19:34:22 -0800 (Mon, 22 Feb 2021)
Log Message
[Payment Request] REGRESSION(r273143): crash shortly after showing the Apple Pay sheet
https://bugs.webkit.org/show_bug.cgi?id=222298
<rdar://problem/74557943>
Reviewed by Wenson Hsieh.
* Platform/cocoa/PaymentAuthorizationPresenter.mm:
(WebKit::toNSErrors):
Don't use `adoptNS` with `+[NSMutableArray array]` since that returns an autoreleased object.
Use the helper `createNSArray` instead (as was previously done before r273143).
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (273296 => 273297)
--- trunk/Source/WebKit/ChangeLog 2021-02-23 03:16:32 UTC (rev 273296)
+++ trunk/Source/WebKit/ChangeLog 2021-02-23 03:34:22 UTC (rev 273297)
@@ -1,3 +1,16 @@
+2021-02-22 Devin Rousso <[email protected]>
+
+ [Payment Request] REGRESSION(r273143): crash shortly after showing the Apple Pay sheet
+ https://bugs.webkit.org/show_bug.cgi?id=222298
+ <rdar://problem/74557943>
+
+ Reviewed by Wenson Hsieh.
+
+ * Platform/cocoa/PaymentAuthorizationPresenter.mm:
+ (WebKit::toNSErrors):
+ Don't use `adoptNS` with `+[NSMutableArray array]` since that returns an autoreleased object.
+ Use the helper `createNSArray` instead (as was previously done before r273143).
+
2021-02-22 Wenson Hsieh <[email protected]>
WebMouseEvent.h should avoid pulling in WebCore headers that know about DOM nodes
Modified: trunk/Source/WebKit/Platform/cocoa/PaymentAuthorizationPresenter.mm (273296 => 273297)
--- trunk/Source/WebKit/Platform/cocoa/PaymentAuthorizationPresenter.mm 2021-02-23 03:16:32 UTC (rev 273296)
+++ trunk/Source/WebKit/Platform/cocoa/PaymentAuthorizationPresenter.mm 2021-02-23 03:34:22 UTC (rev 273297)
@@ -180,12 +180,9 @@
static RetainPtr<NSArray> toNSErrors(const Vector<RefPtr<WebCore::ApplePayError>>& errors)
{
- auto array = adoptNS(NSMutableArray.array);
- for (auto& error : errors) {
- if (error)
- [array addObject:toNSError(*error)];
- }
- return array;
+ return createNSArray(errors, [] (auto& error) -> NSError * {
+ return error ? toNSError(*error) : nil;
+ });
}
static RetainPtr<NSArray> toPKShippingMethods(const Vector<WebCore::ApplePayShippingMethod>& shippingMethods)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes