![]() |
v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
|
#include <heap-consistency.h>
Public Member Functions | |
DisallowGarbageCollectionScope (HeapHandle &heap_handle) | |
~DisallowGarbageCollectionScope () | |
DisallowGarbageCollectionScope (const DisallowGarbageCollectionScope &)=delete | |
DisallowGarbageCollectionScope & | operator= (const DisallowGarbageCollectionScope &)=delete |
Static Public Member Functions | |
static bool | IsGarbageCollectionAllowed (HeapHandle &heap_handle) |
static void | Enter (HeapHandle &heap_handle) |
static void | Leave (HeapHandle &heap_handle) |
Private Member Functions | |
CPPGC_STACK_ALLOCATED () | |
Private Attributes | |
HeapHandle & | heap_handle_ |
Disallows garbage collection finalizations. Any garbage collection triggers result in a crash when in this scope.
Note that the garbage collector already covers paths that can lead to garbage collections, so user code does not require checking IsGarbageCollectionAllowed()
before allocations.
Definition at line 220 of file heap-consistency.h.
|
explicit |
Constructs a scoped object that automatically enters and leaves a disallow garbage collection scope based on its lifetime.
heap_handle | The corresponding heap. |
Definition at line 33 of file heap-consistency.cc.
cppgc::subtle::DisallowGarbageCollectionScope::~DisallowGarbageCollectionScope | ( | ) |
|
delete |
|
private |
|
static |
Enters a disallow garbage collection scope. Must be paired with Leave()
. Prefer a scope instance of DisallowGarbageCollectionScope
.
heap_handle | The corresponding heap. |
Definition at line 22 of file heap-consistency.cc.
|
static |
Definition at line 15 of file heap-consistency.cc.
|
static |
Leaves a disallow garbage collection scope. Must be paired with Enter()
. Prefer a scope instance of DisallowGarbageCollectionScope
.
heap_handle | The corresponding heap. |
Definition at line 28 of file heap-consistency.cc.
|
delete |
|
private |
Definition at line 260 of file heap-consistency.h.