Commit 890da818 authored by Omer Katz's avatar Omer Katz Committed by V8 LUCI CQ

cppgc: Fix GC flags for CppHeap.

The new flags enum had kReduceMemory as the first value, which means it
got the value 0 and thus was considered as never set.

Bug: v8:12407, chromium:1274954
Change-Id: Ifcce2316c1dcd09a12ad52ef391f513b014aea1c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3310609Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#78189}
parent 309dac5f
......@@ -31,9 +31,10 @@ class V8_EXPORT_PRIVATE CppHeap final
public v8::CppHeap,
public cppgc::internal::StatsCollector::AllocationObserver {
public:
enum GarbageCollectionFlagValues {
kReduceMemory,
kForced,
enum GarbageCollectionFlagValues : uint8_t {
kNoFlags = 0,
kReduceMemory = 1 << 1,
kForced = 1 << 2,
};
using GarbageCollectionFlags = base::Flags<GarbageCollectionFlagValues>;
......@@ -165,6 +166,8 @@ class V8_EXPORT_PRIVATE CppHeap final
friend class MetricRecorderAdapter;
};
DEFINE_OPERATORS_FOR_FLAGS(CppHeap::GarbageCollectionFlags)
} // namespace internal
} // namespace v8
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment