cef/patch/patches/win_partition_freelist_entr...

40 lines
1.9 KiB
Diff

diff --git base/allocator/partition_allocator/src/partition_alloc/partition_freelist_entry.h base/allocator/partition_allocator/src/partition_alloc/partition_freelist_entry.h
index 889f6c3d02d2b..eaa8e98ef9c9e 100644
--- base/allocator/partition_allocator/src/partition_alloc/partition_freelist_entry.h
+++ base/allocator/partition_allocator/src/partition_alloc/partition_freelist_entry.h
@@ -10,7 +10,6 @@
#include "partition_alloc/partition_alloc_base/bits.h"
#include "partition_alloc/partition_alloc_base/compiler_specific.h"
#include "partition_alloc/partition_alloc_base/component_export.h"
-#include "partition_alloc/partition_alloc_base/no_destructor.h"
#include "partition_alloc/partition_alloc_buildflags.h"
#include "partition_alloc/partition_alloc_constants.h"
@@ -299,16 +298,18 @@ PA_ALWAYS_INLINE const PartitionFreelistDispatcher*
PartitionFreelistDispatcher::Create(PartitionFreelistEncoding encoding) {
switch (encoding) {
case PartitionFreelistEncoding::kEncodedFreeList: {
- static base::NoDestructor<PartitionFreelistDispatcherImpl<
- PartitionFreelistEncoding::kEncodedFreeList>>
- encoded_impl;
- return encoded_impl.get();
+ static constinit PartitionFreelistDispatcherImpl<
+ PartitionFreelistEncoding::kEncodedFreeList>
+ encoded = PartitionFreelistDispatcherImpl<
+ PartitionFreelistEncoding::kEncodedFreeList>();
+ return &encoded;
}
case PartitionFreelistEncoding::kPoolOffsetFreeList: {
- static base::NoDestructor<PartitionFreelistDispatcherImpl<
- PartitionFreelistEncoding::kPoolOffsetFreeList>>
- pool_offset_impl;
- return pool_offset_impl.get();
+ static constinit PartitionFreelistDispatcherImpl<
+ PartitionFreelistEncoding::kPoolOffsetFreeList>
+ pool = PartitionFreelistDispatcherImpl<
+ PartitionFreelistEncoding::kPoolOffsetFreeList>();
+ return &pool;
}
}
}