Skip to content

Commit 7598794

Browse files
zmodemkraj
authored andcommitted
[Backport] 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 Upstream-Status: Backport [https://chromium-review.googlesource.com/c/chromium/src/+/5515154] Bug: 338536260 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5515154 Auto-Submit: Hans Wennborg <[email protected]> Commit-Queue: Daniel Cheng <[email protected]> Reviewed-by: Daniel Cheng <[email protected]> Commit-Queue: Hans Wennborg <[email protected]> Cr-Commit-Position: refs/heads/main@{#1296238} Change-Id: Ib03c42053429b33af592894f0ce39ea4faaf68ad Pick-to: 118-based Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/586023 Reviewed-by: Peter Varga <[email protected]>
1 parent 27c30aa commit 7598794

File tree

1 file changed

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

1 file changed

+1
-3
lines changed

chromium/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)