v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
v8::internal::JSFinalizationRegistry Class Reference

#include <js-weak-refs.h>

Inheritance diagram for v8::internal::JSFinalizationRegistry:
Collaboration diagram for v8::internal::JSFinalizationRegistry:

Classes

class  BodyDescriptor
 

Public Types

enum  RemoveUnregisterTokenMode { kRemoveMatchedCellsFromRegistry , kKeepMatchedCellsInRegistry }
 

Public Member Functions

template<typename GCNotifyUpdatedSlotCallback >
bool RemoveUnregisterToken (Tagged< HeapObject > unregister_token, Isolate *isolate, RemoveUnregisterTokenMode removal_mode, GCNotifyUpdatedSlotCallback gc_notify_updated_slot)
 
bool NeedsCleanup () const
 
V8_EXPORT_PRIVATE Tagged< WeakCellPopClearedCell (Isolate *isolate, bool *key_map_may_need_shrink)
 
V8_EXPORT_PRIVATE void RemoveCellFromUnregisterTokenMap (Isolate *isolate, Tagged< WeakCell > weak_cell)
 

Static Public Member Functions

static void RegisterWeakCellWithUnregisterToken (DirectHandle< JSFinalizationRegistry > finalization_registry, DirectHandle< WeakCell > weak_cell, Isolate *isolate)
 
static bool Unregister (DirectHandle< JSFinalizationRegistry > finalization_registry, DirectHandle< HeapObject > unregister_token, Isolate *isolate)
 
static void ShrinkKeyMap (Isolate *isolate, DirectHandle< JSFinalizationRegistry > finalization_registry)
 
static Maybe< boolCleanup (Isolate *isolate, DirectHandle< JSFinalizationRegistry > finalization_registry)
 

Detailed Description

Definition at line 24 of file js-weak-refs.h.

Member Enumeration Documentation

◆ RemoveUnregisterTokenMode

Enumerator
kRemoveMatchedCellsFromRegistry 
kKeepMatchedCellsInRegistry 

Definition at line 46 of file js-weak-refs.h.

Member Function Documentation

◆ Cleanup()

Maybe< bool > v8::internal::JSFinalizationRegistry::Cleanup ( Isolate * isolate,
DirectHandle< JSFinalizationRegistry > finalization_registry )
static

Definition at line 50 of file js-weak-refs.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ NeedsCleanup()

bool v8::internal::JSFinalizationRegistry::NeedsCleanup ( ) const
inline

Definition at line 157 of file js-weak-refs-inl.h.

◆ PopClearedCell()

Tagged< WeakCell > v8::internal::JSFinalizationRegistry::PopClearedCell ( Isolate * isolate,
bool * key_map_may_need_shrink )

Definition at line 13 of file js-weak-refs.cc.

Here is the call graph for this function:

◆ RegisterWeakCellWithUnregisterToken()

static void v8::internal::JSFinalizationRegistry::RegisterWeakCellWithUnregisterToken ( DirectHandle< JSFinalizationRegistry > finalization_registry,
DirectHandle< WeakCell > weak_cell,
Isolate * isolate )
inlinestatic
Here is the caller graph for this function:

◆ RemoveCellFromUnregisterTokenMap()

void v8::internal::JSFinalizationRegistry::RemoveCellFromUnregisterTokenMap ( Isolate * isolate,
Tagged< WeakCell > weak_cell )

Definition at line 90 of file js-weak-refs.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RemoveUnregisterToken()

template<typename GCNotifyUpdatedSlotCallback >
bool v8::internal::JSFinalizationRegistry::RemoveUnregisterToken ( Tagged< HeapObject > unregister_token,
Isolate * isolate,
RemoveUnregisterTokenMode removal_mode,
GCNotifyUpdatedSlotCallback gc_notify_updated_slot )
inline

Definition at line 71 of file js-weak-refs-inl.h.

Here is the call graph for this function:

◆ ShrinkKeyMap()

void v8::internal::JSFinalizationRegistry::ShrinkKeyMap ( Isolate * isolate,
DirectHandle< JSFinalizationRegistry > finalization_registry )
static

Definition at line 36 of file js-weak-refs.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Unregister()

bool v8::internal::JSFinalizationRegistry::Unregister ( DirectHandle< JSFinalizationRegistry > finalization_registry,
DirectHandle< HeapObject > unregister_token,
Isolate * isolate )
inlinestatic

Definition at line 59 of file js-weak-refs-inl.h.

Here is the caller graph for this function:

The documentation for this class was generated from the following files: