![]() |
v8 13.6.233 (node 24.1.0)
V8 is Google's open source JavaScript engine
|
#include <v8-util.h>
Data Structures | |
class | PersistentValueReference |
Public Member Functions | |
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) |
Protected Member Functions | |
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 | |
static V * | FromVal (PersistentContainerValue v) |
static PersistentContainerValue | ClearAndLeak (Global< V > *persistent) |
static PersistentContainerValue | Leak (Global< V > *persistent) |
static Global< V > | Release (PersistentContainerValue v) |
A map wrapper that allows using Global as a mapped value. C++11 embedders don't need this class, as they can use Global directly in std containers.
The map relies on a backing map, whose type and accessors are described by the Traits class. The backing map will handle values of type PersistentContainerValue, with all conversion into and out of V8 handles being transparently handled by this class.
|
inlineexplicitprotected |
Definition at line 291 of file v8-util.h.
Referenced by GlobalValueMap< K, V, DefaultGlobalMapTraits< K, V > >::GlobalValueMap(), GlobalValueMap< K, V, DefaultGlobalMapTraits< K, V > >::GlobalValueMap(), PersistentValueMap< K, V, DefaultPersistentValueMapTraits< K, V > >::PersistentValueMap(), and PersistentValueMap< K, V, DefaultPersistentValueMapTraits< K, V > >::PersistentValueMap().
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
Definition at line 338 of file v8-util.h.
Referenced by GlobalValueMap< K, V, DefaultGlobalMapTraits< K, V > >::SetUnique(), and PersistentValueMap< K, V, DefaultPersistentValueMapTraits< K, V > >::SetUnique().
|
inline |
Traverses the map repeatedly, in case side effects of disposal cause insertions.
Definition at line 218 of file v8-util.h.
Referenced by PersistentValueReference< K, V, Traits >::~PersistentValueMapBase().
|
inlinestaticprotected |
Definition at line 306 of file v8-util.h.
Referenced by GlobalValueMap< K, V, DefaultGlobalMapTraits< K, V > >::SetUnique(), and PersistentValueMap< K, V, DefaultPersistentValueMapTraits< K, V > >::SetUnique().
|
inline |
|
inlinestaticprotected |
Definition at line 301 of file v8-util.h.
Referenced by PersistentValueReference< K, V, Traits >::Get().
|
inline |
Get a reference to a map value. This enables fast, repeated access to a value stored in the map while the map remains unchanged.
Careful: This is potentially unsafe, so please use with care. The value will become invalid if the value for this key changes in the underlying map, as a result of Set or Remove for the same key; as a result of the weak callback for the same key; or as a result of calling Clear() or destruction of the map.
|
inlineprotected |
Definition at line 299 of file v8-util.h.
Referenced by GlobalValueMap< K, V, DefaultGlobalMapTraits< K, V > >::SetUnique(), and PersistentValueMap< K, V, DefaultPersistentValueMapTraits< K, V > >::SetUnique().
Definition at line 298 of file v8-util.h.
Referenced by GlobalValueMap< K, V, DefaultGlobalMapTraits< K, V > >::GlobalValueMap(), GlobalValueMap< K, V, DefaultGlobalMapTraits< K, V > >::GlobalValueMap(), PersistentValueMapBase< K, V, Traits >::PersistentValueReference::NewLocal(), PersistentValueMap< K, V, DefaultPersistentValueMapTraits< K, V > >::PersistentValueMap(), PersistentValueMap< K, V, DefaultPersistentValueMapTraits< K, V > >::PersistentValueMap(), GlobalValueMap< K, V, DefaultGlobalMapTraits< K, V > >::Set(), PersistentValueMap< K, V, DefaultPersistentValueMapTraits< K, V > >::Set(), GlobalValueMap< K, V, DefaultGlobalMapTraits< K, V > >::SetUnique(), PersistentValueMap< K, V, DefaultPersistentValueMapTraits< K, V > >::SetUnique(), StdGlobalValueMap< K, V, Traits >::StdGlobalValueMap(), and StdPersistentValueMap< K, V, Traits >::StdPersistentValueMap().
|
inline |
|
inlinestaticprotected |
Definition at line 312 of file v8-util.h.
Referenced by GlobalValueMap< K, V, DefaultGlobalMapTraits< K, V > >::Set(), and PersistentValueMap< K, V, DefaultPersistentValueMapTraits< K, V > >::Set().
|
inlinestaticprotected |
Return a container value as Global and make sure the weak callback is properly disposed of. All remove functionality should go through this.
Definition at line 321 of file v8-util.h.
Referenced by PersistentValueReference< K, V, Traits >::Clear(), PersistentValueReference< K, V, Traits >::Remove(), GlobalValueMap< K, V, DefaultGlobalMapTraits< K, V > >::SetUnique(), and PersistentValueMap< K, V, DefaultPersistentValueMapTraits< K, V > >::SetUnique().
|
inlineprotected |
|
inline |
|
inline |