v8 12.4.254 (node 22.4.1)
V8 is Google's open source JavaScript engine
|
#include <v8-util.h>
Public Types | |
typedef PersistentValueMapBase< K, V, Traits >::PersistentValueReference | PersistentValueReference |
Public Member Functions | |
PersistentValueMap (Isolate *isolate) | |
PersistentValueMap (Isolate *isolate, const char *label) | |
Global< V > | Set (const K &key, Local< V > value) |
Global< V > | Set (const K &key, Global< V > value) |
Global< V > | SetUnique (const K &key, Global< V > *persistent) |
Global< V > | Set (const K &key, Global< V > value, PersistentValueReference *reference) |
Public Member Functions inherited from PersistentValueMapBase< K, V, Traits > | |
Isolate * | GetIsolate () |
size_t | Size () |
bool | IsWeak () |
Local< V > | Get (const K &key) |
bool | Contains (const K &key) |
bool | SetReturnValue (const K &key, ReturnValue< Value > returnValue) |
Global< V > | Remove (const K &key) |
void | Clear () |
PersistentValueReference | GetReference (const K &key) |
Additional Inherited Members | |
Protected Member Functions inherited from PersistentValueMapBase< K, V, Traits > | |
PersistentValueMapBase (Isolate *isolate) | |
PersistentValueMapBase (Isolate *isolate, const char *label) | |
~PersistentValueMapBase () | |
Isolate * | isolate () |
Traits::Impl * | impl () |
void | RemoveWeak (const K &key) |
void | AnnotateStrongRetainer (Global< V > *persistent) |
Static Protected Member Functions inherited from PersistentValueMapBase< K, V, Traits > | |
static V * | FromVal (PersistentContainerValue v) |
static PersistentContainerValue | ClearAndLeak (Global< V > *persistent) |
static PersistentContainerValue | Leak (Global< V > *persistent) |
static Global< V > | Release (PersistentContainerValue v) |
typedef PersistentValueMapBase<K,V,Traits>::PersistentValueReference PersistentValueReference |
|
inlineexplicit |
|
inline |
|
inline |
Put value into map, like Set(const K&, Local<V>).
Definition at line 385 of file v8-util.h.
References PersistentValueMap< K, V, Traits >::SetUnique().
|
inline |
Put a value into the map and update the reference. Restrictions of GetReference apply here as well.
Definition at line 415 of file v8-util.h.
References PersistentValueMapBase< K, V, Traits >::Leak(), and PersistentValueMap< K, V, Traits >::SetUnique().
|
inline |
Put value into map. Depending on Traits::kIsWeak, the value will be held by the map strongly or weakly. Returns old value as Global.
Definition at line 377 of file v8-util.h.
References PersistentValueMapBase< K, V, Traits >::isolate(), and PersistentValueMap< K, V, Traits >::SetUnique().
|
inline |
Put the value into the map, and set the 'weak' callback when demanded by the Traits class.
Definition at line 393 of file v8-util.h.
References PersistentValueMapBase< K, V, Traits >::AnnotateStrongRetainer(), PersistentValueMapBase< K, V, Traits >::ClearAndLeak(), PersistentValueMapBase< K, V, Traits >::impl(), PersistentValueMapBase< K, V, Traits >::isolate(), v8::kInternalFields, v8::kNotWeak, v8::kParameter, v8::kWeakWithInternalFields, Local< T >::New(), and PersistentValueMapBase< K, V, Traits >::Release().
Referenced by PersistentValueMap< K, V, Traits >::Set(), PersistentValueMap< K, V, Traits >::Set(), and PersistentValueMap< K, V, Traits >::Set().