18 #include "precompiled.h"
33 jsval* p =
new jsval(val);
34 JS_AddNamedValueRoot(cx, p,
"CScriptValRooted");
40 jsval* p =
new jsval(val.
get());
41 JS_AddNamedValueRoot(cx, p,
"CScriptValRooted");
69 m_Context(cx), m_IdArray(ida)
bool uninitialised() const
Returns whether the value is uninitialised.
boost::shared_ptr< jsval > m_Val
const jsval & get() const
Returns the current value.
A trivial wrapper around a jsval.
void operator()(jsval *p)
AutoJSIdArray(JSContext *cx, JSIdArray *ida)
#define ENSURE(expr)
ensure the expression <expr> evaluates to non-zero.
bool undefined() const
Returns whether the value is uninitialised or is JSVAL_VOID.
jsid operator[](size_t i) const
jsval & getRef() const
Returns reference to the current value.
jsval get() const
Returns the current value (or JSVAL_VOID if uninitialised).