Commit da8feb09 authored by Michael Lippautz's avatar Michael Lippautz Committed by Commit Bot

heap/api: Use regular enum to simplify embedder code

Change-Id: I1b386a11d4a9d1319ac18efd53108aea851f8897
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1594561
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61207}
parent 7404b44a
......@@ -7171,7 +7171,7 @@ enum class MemoryPressureLevel { kNone, kModerate, kCritical };
*/
class V8_EXPORT EmbedderHeapTracer {
public:
enum class TraceFlags : uint64_t {
enum TraceFlags : uint64_t {
kNoFlags = 0,
kReduceMemory = 1 << 0,
};
......@@ -7289,18 +7289,6 @@ class V8_EXPORT EmbedderHeapTracer {
friend class internal::LocalEmbedderHeapTracer;
};
constexpr EmbedderHeapTracer::TraceFlags operator&(
EmbedderHeapTracer::TraceFlags lhs, EmbedderHeapTracer::TraceFlags rhs) {
return static_cast<EmbedderHeapTracer::TraceFlags>(
static_cast<uint64_t>(lhs) & static_cast<uint64_t>(rhs));
}
constexpr EmbedderHeapTracer::TraceFlags operator|(
EmbedderHeapTracer::TraceFlags lhs, EmbedderHeapTracer::TraceFlags rhs) {
return static_cast<EmbedderHeapTracer::TraceFlags>(
static_cast<uint64_t>(lhs) | static_cast<uint64_t>(rhs));
}
/**
* Callback and supporting data used in SnapshotCreator to implement embedder
* logic to serialize internal fields.
......
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