Skip to content

Commit

Permalink
cppgc: Fix CustomSpace trait
Browse files Browse the repository at this point in the history
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 <[email protected]>
Commit-Queue: Omer Katz <[email protected]>
Auto-Submit: Michael Lippautz <[email protected]>
Reviewed-by: Omer Katz <[email protected]>
Cr-Commit-Position: refs/heads/master@{#72372}
  • Loading branch information
mlippautz authored and Commit Bot committed Jan 27, 2021
1 parent aa4ee8d commit cf380f5
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions include/cppgc/custom-space.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,18 @@ class CustomSpaceBase {
template <typename ConcreteCustomSpace>
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;
};

/**
Expand Down

0 comments on commit cf380f5

Please sign in to comment.