Loading...
Searching...
No Matches
v8-embedder-heap.h
Go to the documentation of this file.
1// Copyright 2021 the V8 project authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef INCLUDE_V8_EMBEDDER_HEAP_H_
6#define INCLUDE_V8_EMBEDDER_HEAP_H_
7
8#include "v8-traced-handle.h" // NOLINT(build/include_directory)
9#include "v8config.h" // NOLINT(build/include_directory)
10
11namespace v8 {
12namespace internal {
13class TracedHandles;
14} // namespace internal
15
16class Isolate;
17class Value;
18
23 public:
24 virtual ~EmbedderRootsHandler() = default;
25
27
37 virtual void ResetRoot(const v8::TracedReference<v8::Value>& handle) = 0;
38
44 virtual bool TryResetRoot(const v8::TracedReference<v8::Value>& handle) {
45 ResetRoot(handle);
46 return true;
47 }
48
49 private:
50 friend class internal::TracedHandles;
51};
52
53} // namespace v8
54
55#endif // INCLUDE_V8_EMBEDDER_HEAP_H_
Definition: v8-embedder-heap.h:22
virtual ~EmbedderRootsHandler()=default
virtual void ResetRoot(const v8::TracedReference< v8::Value > &handle)=0
virtual bool TryResetRoot(const v8::TracedReference< v8::Value > &handle)
Definition: v8-embedder-heap.h:44
Definition: v8-traced-handle.h:165
Definition: libplatform.h:15
#define V8_EXPORT
Definition: v8config.h:793