12345678910111213141516171819202122232425262728293031323334 |
- From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
- From: VerteDinde <[email protected]>
- Date: Wed, 13 Dec 2023 12:53:11 -0800
- Subject: fix: enable partition alloc ref count size for MacOS 13+
- Modifies an existing check to check for all versions of MacOS 13
- or higher, including MacOS 14 and potential beta versions.
- This patch is currently being added upstream, and can be removed
- when we integrate the upstream changes into Electron.
- diff --git a/base/allocator/partition_allocator/src/partition_alloc/partition_ref_count.h b/base/allocator/partition_allocator/src/partition_alloc/partition_ref_count.h
- index cfc0e1092fc560408c75c54d033cf76c5ef9348a..8ca7df7d43c11229149385156d3390a717428a27 100644
- --- a/base/allocator/partition_allocator/src/partition_alloc/partition_ref_count.h
- +++ b/base/allocator/partition_allocator/src/partition_alloc/partition_ref_count.h
- @@ -32,7 +32,7 @@ namespace partition_alloc::internal {
-
- // Aligns up (on 8B boundary) and returns `ref_count_size` if needed.
- // * Known to be needed on MacOS 13: https://crbug.com/1378822.
- -// * Thought to be needed on MacOS 14: https://crbug.com/1457756.
- +// * Thought to be needed on MacOS 14 and higher: https://crbug.com/1457756.
- // * No-op everywhere else.
- //
- // Placed outside `BUILDFLAG(ENABLE_BACKUP_REF_PTR_SUPPORT)`
- @@ -40,8 +40,7 @@ namespace partition_alloc::internal {
- // this gating.
- PA_ALWAYS_INLINE size_t AlignUpRefCountSizeForMac(size_t ref_count_size) {
- #if BUILDFLAG(IS_MAC)
- - if (internal::base::mac::MacOSMajorVersion() == 13 ||
- - internal::base::mac::MacOSMajorVersion() == 14) {
- + if (internal::base::mac::MacOSMajorVersion() >= 13) {
- return internal::base::bits::AlignUp<size_t>(ref_count_size, 8);
- }
- #endif // BUILDFLAG(IS_MAC)
|