summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Varga <pvarga@inf.u-szeged.hu>2022-11-15 13:39:24 +0100
committerPeter Varga <pvarga@inf.u-szeged.hu>2022-11-16 07:54:36 +0000
commitadb0e43b4a0c79ef565b7fa3ff05936bf2f194a5 (patch)
tree08bbdc6a69f6fcd9b493f67e9cba28fd66a1fa60
parent342a6a8e111c1b94d4516ab87ec9ca12e3159c0e (diff)
downloadqtwebengine-chromium-adb0e43b4a0c79ef565b7fa3ff05936bf2f194a5.tar.gz
[Backport] [PA] Uninline sentinel slot span
This change partially undoes https://crrev.com/c/3412485, in which the sentinel slot span was marked `inline` at its declaration inside `SlotSpanMetadata`. This is needed to build under MSVC, which otherwise immediately spits out ``` partition_page.h(313): error C2512: 'partition_alloc::internal::SlotSpanMetadata<true>': no appropriate default constructor available partition_bucket.h(29): note: see declaration of 'partition_alloc::internal::SlotSpanMetadata<true>' partition_page.h(327): note: see reference to class template instantiation 'partition_alloc::internal::SlotSpanMetadata<true>' being compiled ``` Bug: 1351310 Change-Id: I2b419c978206ce9c2786826f9ff39bf9a5fcf7ed Review-URL: https://chromium-review.googlesource.com/c/chromium/src/+/3858985 Cr-Commit-Position: refs/heads/main@{#1039664} Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/443564 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
-rw-r--r--chromium/base/allocator/partition_allocator/partition_page.cc4
-rw-r--r--chromium/base/allocator/partition_allocator/partition_page.h2
2 files changed, 5 insertions, 1 deletions
diff --git a/chromium/base/allocator/partition_allocator/partition_page.cc b/chromium/base/allocator/partition_allocator/partition_page.cc
index 982e516a88e..f2beba05df5 100644
--- a/chromium/base/allocator/partition_allocator/partition_page.cc
+++ b/chromium/base/allocator/partition_allocator/partition_page.cc
@@ -134,6 +134,10 @@ PA_ALWAYS_INLINE void SlotSpanMetadata<thread_safe>::RegisterEmpty() {
root->empty_slot_spans_dirty_bytes / 2, max_empty_dirty_bytes));
}
}
+// static
+template <bool thread_safe>
+SlotSpanMetadata<thread_safe>
+ SlotSpanMetadata<thread_safe>::sentinel_slot_span_;
// static
template <bool thread_safe>
diff --git a/chromium/base/allocator/partition_allocator/partition_page.h b/chromium/base/allocator/partition_allocator/partition_page.h
index 6525ff6bbe7..4497b22be7c 100644
--- a/chromium/base/allocator/partition_allocator/partition_page.h
+++ b/chromium/base/allocator/partition_allocator/partition_page.h
@@ -309,7 +309,7 @@ struct SlotSpanMetadata {
//
// Note, this declaration is kept in the header as opposed to an anonymous
// namespace so the getter can be fully inlined.
- static inline SlotSpanMetadata sentinel_slot_span_;
+ static SlotSpanMetadata sentinel_slot_span_;
// For the sentinel.
constexpr SlotSpanMetadata() noexcept
: marked_full(0),