Changeset 273297 in webkit
- Timestamp:
- Feb 22, 2021, 7:34:22 PM (6 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
Platform/cocoa/PaymentAuthorizationPresenter.mm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r273296 r273297 1 2021-02-22 Devin Rousso <drousso@apple.com> 2 3 [Payment Request] REGRESSION(r273143): crash shortly after showing the Apple Pay sheet 4 https://bugs.webkit.org/show_bug.cgi?id=222298 5 <rdar://problem/74557943> 6 7 Reviewed by Wenson Hsieh. 8 9 * Platform/cocoa/PaymentAuthorizationPresenter.mm: 10 (WebKit::toNSErrors): 11 Don't use `adoptNS` with `+[NSMutableArray array]` since that returns an autoreleased object. 12 Use the helper `createNSArray` instead (as was previously done before r273143). 13 1 14 2021-02-22 Wenson Hsieh <wenson_hsieh@apple.com> 2 15 -
trunk/Source/WebKit/Platform/cocoa/PaymentAuthorizationPresenter.mm
r273159 r273297 181 181 static RetainPtr<NSArray> toNSErrors(const Vector<RefPtr<WebCore::ApplePayError>>& errors) 182 182 { 183 auto array = adoptNS(NSMutableArray.array); 184 for (auto& error : errors) { 185 if (error) 186 [array addObject:toNSError(*error)]; 187 } 188 return array; 183 return createNSArray(errors, [] (auto& error) -> NSError * { 184 return error ? toNSError(*error) : nil; 185 }); 189 186 } 190 187
Note:
See TracChangeset
for help on using the changeset viewer.