Skip to content

Commit 0946a33

Browse files
author
Mohannad Farrag
committed
[Cherry Pick] Fix NoDestructor::PlacementStorage::get() const
It was trying to call a storage() method, which doesn't exist in PlacementStorage. This was uncovered by a recent Clang change: llvm/llvm-project#90152 Test: TH Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5515154 Change-Id: I5600487e559b36026a8114027b224380fc2e5183
1 parent ff5b13d commit 0946a33

File tree

1 file changed

+1
-3
lines changed
  • base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base

1 file changed

+1
-3
lines changed

base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/no_destructor.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,7 @@ class NoDestructor {
122122
new (storage_) T(std::forward<Args>(args)...);
123123
}
124124

125-
const T* get() const {
126-
return const_cast<PlacementStorage*>(this)->storage();
127-
}
125+
const T* get() const { return const_cast<PlacementStorage*>(this)->get(); }
128126
T* get() { return reinterpret_cast<T*>(storage_); }
129127

130128
private:

0 commit comments

Comments
 (0)