Pyrogenesis
trunk
|
A default constructible wrapper around JS::PersistentRootedValue. More...
#include <ScriptVal.h>
Public Member Functions | |
DefPersistentRooted () | |
DefPersistentRooted (JSRuntime *rt) | |
DefPersistentRooted (JSRuntime *rt, JS::HandleValue val) | |
DefPersistentRooted (JSContext *cx, JS::Handle< T > val) | |
void | clear () |
bool | uninitialized () |
JS::PersistentRooted< T > & | get () const |
void | set (JSRuntime *rt, T val) |
void | set (JSContext *cx, T val) |
DefPersistentRooted< T > & | operator= (DefPersistentRooted< T > &&other) |
DefPersistentRooted (DefPersistentRooted< T > &&other) | |
Private Attributes | |
std::unique_ptr< JS::PersistentRooted< T > > | m_Val |
A default constructible wrapper around JS::PersistentRootedValue.
It's a very common case that we need to store JS::Values on the heap as class members and only need them conditionally or want to initialize them after the constructor because we don't have the runtime available yet. Use it in these cases, but prefer to use JS::PersistentRootedValue directly if initializing it with a runtime/context in the constructor isn't a problem.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
private |