v8  9.0.257(node16.0.0)
V8 is Google's open source JavaScript engine
prefinalizer.h File Reference
Include dependency graph for prefinalizer.h:

Go to the source code of this file.

Data Structures

class  PrefinalizerRegistration< T >
 

Namespaces

 cppgc
 
 cppgc::internal
 

Macros

#define CPPGC_USING_PRE_FINALIZER(Class, PreFinalizer)
 

Macro Definition Documentation

◆ CPPGC_USING_PRE_FINALIZER

#define CPPGC_USING_PRE_FINALIZER (   Class,
  PreFinalizer 
)
Value:
public: \
static bool InvokePreFinalizer(const cppgc::LivenessBroker& liveness_broker, \
void* object) { \
static_assert(cppgc::IsGarbageCollectedOrMixinTypeV<Class>, \
"Only garbage collected objects can have prefinalizers"); \
Class* self = static_cast<Class*>(object); \
if (liveness_broker.IsHeapObjectAlive(self)) return false; \
self->Class::PreFinalizer(); \
return true; \
} \
\
private: \
CPPGC_NO_UNIQUE_ADDRESS cppgc::internal::PrefinalizerRegistration<Class> \
prefinalizer_dummy_{this}; \
static_assert(true, "Force semicolon.")

Definition at line 33 of file prefinalizer.h.

cppgc::LivenessBroker::IsHeapObjectAlive
bool IsHeapObjectAlive(const T *object) const
Definition: liveness-broker.h:46
CPPGC_NO_UNIQUE_ADDRESS
#define CPPGC_NO_UNIQUE_ADDRESS
Definition: compiler-specific.h:27
cppgc
Definition: allocation.h:17
cppgc::LivenessBroker
Definition: liveness-broker.h:43