Title: [273323] branches/safari-612.1.5-branch/Source/WebKit
- Revision
- 273323
- Author
- [email protected]
- Date
- 2021-02-23 11:41:05 -0800 (Tue, 23 Feb 2021)
Log Message
Cherry-pick r273297. rdar://problem/74650857
[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).
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@273297 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Diff
Modified: branches/safari-612.1.5-branch/Source/WebKit/ChangeLog (273322 => 273323)
--- branches/safari-612.1.5-branch/Source/WebKit/ChangeLog 2021-02-23 19:10:55 UTC (rev 273322)
+++ branches/safari-612.1.5-branch/Source/WebKit/ChangeLog 2021-02-23 19:41:05 UTC (rev 273323)
@@ -1,3 +1,34 @@
+2021-02-23 Russell Epstein <[email protected]>
+
+ Cherry-pick r273297. rdar://problem/74650857
+
+ [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).
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@273297 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 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-20 Brent Fulgham <[email protected]>
[Cocoa] Update WebCoreArgumentCodersMac with some new additions
Modified: branches/safari-612.1.5-branch/Source/WebKit/Platform/cocoa/PaymentAuthorizationPresenter.mm (273322 => 273323)
--- branches/safari-612.1.5-branch/Source/WebKit/Platform/cocoa/PaymentAuthorizationPresenter.mm 2021-02-23 19:10:55 UTC (rev 273322)
+++ branches/safari-612.1.5-branch/Source/WebKit/Platform/cocoa/PaymentAuthorizationPresenter.mm 2021-02-23 19:41:05 UTC (rev 273323)
@@ -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