Access an object's reserved slots.
// Added in SpiderMonkey 42 JS::Value JS_GetReservedSlot(JSObject *obj, uint32_t index); void JS_SetReservedSlot(JSObject *obj, uint32_t index, JS::Value v); // Obsolete since SpiderMonkey 42 jsval JS_GetReservedSlot(JSObject *obj, uint32_t index); void JS_SetReservedSlot(JSObject *obj, uint32_t index, jsval v);
||An object that has reserved slots.|
||Index of the reserved slot to access.|
JSCLASS_HAS_RESERVED_SLOTS(n) in its
flags, with n > 0, or has a non-null
JSClass.reserveSlots callback, then objects of that class have
n reserved slots in which the application may store data. These fields are not directly exposed to scripts.
Reserved slots may contain any
JS::Value, and the garbage collector will hold the value alive as long as the object itself is alive.
Reserved slots may also contain private values to store pointer values (whose lowest bit is 0) or
New objects' reserved slots are initialized to