Shaka Player Embedded
|
#include <weak_js_ptr.h>
Public Member Functions | |
WeakJsPtr () | |
WeakJsPtr (std::nullptr_t) | |
template<typename U = T> | |
WeakJsPtr (Handle< U > other) | |
WeakJsPtr (const WeakJsPtr &other)=default | |
WeakJsPtr (WeakJsPtr &&other)=default | |
WeakJsPtr & | operator= (const WeakJsPtr &other)=default |
WeakJsPtr & | operator= (WeakJsPtr &&other)=default |
template<typename U = T> | |
bool | operator== (const WeakJsPtr< U > &other) const |
template<typename U = T> | |
bool | operator== (const Handle< U > &other) const |
template<typename U = T> | |
bool | operator!= (const WeakJsPtr< U > &other) const |
template<typename U = T> | |
bool | operator!= (const Handle< U > &other) const |
bool | empty () const |
Handle< T > | handle () const |
ReturnVal< JsValue > | value () const |
void | reset () |
template<typename U > | |
void | reset (Handle< U > other) |
void | Trace (memory::HeapTracer *tracer) const override |
![]() | |
virtual | ~Traceable () |
virtual bool | IsRootedAlive () const |
virtual bool | IsShortLived () const |
Friends | |
template<typename > | |
class | WeakJsPtr |
Additional Inherited Members | |
![]() | |
static constexpr const uint64_t | kShortLiveDurationMs = 5000 |
Represents a weak pointer to a JavaScript value. When the GC runs, when this is traced it will mark the value alive so it is not freed. If this is not traced, the GC will free the value.
This MUST be traced. If the GC runs and the object is freed, this object may become invalid. JSC does not keep track of weak pointers, so this must be traced to remain valid.
This is NOT a GenericConverter and should not be used as arguments, fields, etc.. This should only be used in the mapping types to store JavaScript objects.
Definition at line 44 of file weak_js_ptr.h.
|
inline |
Definition at line 46 of file weak_js_ptr.h.
|
inline |
Definition at line 48 of file weak_js_ptr.h.
|
inline |
Definition at line 51 of file weak_js_ptr.h.
|
default |
|
default |
|
inline |
Definition at line 78 of file weak_js_ptr.h.
|
inline |
Definition at line 87 of file weak_js_ptr.h.
|
inline |
Definition at line 69 of file weak_js_ptr.h.
|
inline |
Definition at line 73 of file weak_js_ptr.h.
|
default |
|
default |
|
inline |
Definition at line 61 of file weak_js_ptr.h.
|
inline |
Definition at line 65 of file weak_js_ptr.h.
|
inline |
Definition at line 101 of file weak_js_ptr.h.
|
inline |
Definition at line 109 of file weak_js_ptr.h.
|
inlineoverridevirtual |
Called during a GC run. This should call HeapTracer::Trace on all Traceable members. Be sure to call the base method when overriding.
Implements shaka::memory::Traceable.
Definition at line 114 of file weak_js_ptr.h.
|
inline |
Definition at line 97 of file weak_js_ptr.h.
Definition at line 133 of file weak_js_ptr.h.