Description
JS_ValueToObject converts a specified JS value, v, to a JS object. The converted object is stored in the object pointed to by objp. If the conversion is successful, JS_ValueToObject returns JS_TRUE. Otherwise it returns JS_FALSE.
You can successfully convert a JS value to an object if the JS value to convert is one of JSVAL_INT, JSVAL_DOUBLE, JSVAL_STRING, JSVAL_BOOLEAN, or JSVAL_OBJECT. Note that if v is already an object, the object returned in objp represents a converted version of v, rather than original version of v.
|