liveness-broker.cc 598 Bytes
Newer Older
1 2 3 4
// 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.

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

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

9 10 11 12 13 14
namespace cppgc {

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

15 16 17 18 19 20 21 22 23
namespace internal {

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

}  // namespace internal

24
}  // namespace cppgc