v8  8.4.371 (node 14.15.5)
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 LivenessBroker& liveness_broker, \
void* object) { \
static_assert(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 internal::PrefinalizerRegistration<Class> \
prefinalizer_dummy_{this}; \
friend class internal::__thisIsHereToForceASemicolonAfterThisMacro
#define CPPGC_NO_UNIQUE_ADDRESS

Definition at line 35 of file prefinalizer.h.