v8  8.6.395 (node 15.0.1)
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::internal::IsGarbageCollectedTypeV<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.")
bool IsHeapObjectAlive(const T *object) const
#define CPPGC_NO_UNIQUE_ADDRESS

Definition at line 33 of file prefinalizer.h.