From cf380f5965a39485d423d9e8a99a8adb152c9b34 Mon Sep 17 00:00:00 2001 From: Michael Lippautz Date: Wed, 27 Jan 2021 16:22:33 +0100 Subject: [PATCH] cppgc: Fix CustomSpace trait Expose kSupportsCompaction to be able to refer to it from other traits. Change-Id: I3a0870853fabfac993eff22886a0a31a52d90055 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2653225 Commit-Queue: Michael Lippautz Commit-Queue: Omer Katz Auto-Submit: Michael Lippautz Reviewed-by: Omer Katz Cr-Commit-Position: refs/heads/master@{#72372} --- include/cppgc/custom-space.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/include/cppgc/custom-space.h b/include/cppgc/custom-space.h index 8c2dd592fe..757c4fde15 100644 --- a/include/cppgc/custom-space.h +++ b/include/cppgc/custom-space.h @@ -48,15 +48,18 @@ class CustomSpaceBase { template class CustomSpace : public CustomSpaceBase { public: + /** + * Compaction is only supported on spaces that manually manage slots + * recording. + */ + static constexpr bool kSupportsCompaction = false; + CustomSpaceIndex GetCustomSpaceIndex() const final { return ConcreteCustomSpace::kSpaceIndex; } bool IsCompactable() const final { return ConcreteCustomSpace::kSupportsCompaction; } - - protected: - static constexpr bool kSupportsCompaction = false; }; /**