summaryrefslogtreecommitdiff
path: root/deps/v8/src/heap/cppgc/liveness-broker.cc
blob: 8c61268ba815521dd83f49079b747b4a11296d4d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// Copyright 2020 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "src/heap/cppgc/liveness-broker.h"

#include "src/heap/cppgc/heap-object-header.h"

namespace cppgc {

bool LivenessBroker::IsHeapObjectAliveImpl(const void* payload) const {
  return internal::HeapObjectHeader::FromPayload(payload).IsMarked();
}

namespace internal {

// static
cppgc::LivenessBroker LivenessBrokerFactory::Create() {
  return cppgc::LivenessBroker();
}

}  // namespace internal

}  // namespace cppgc