This feature is obsolete. Although it is still supported by browsers, its usage is discouraged in new projects. Try to avoid using it.
Causes a native to return a Reference value (as allowed by ECMA 262-3 §11.2.3).
||The context in which the native function is running.|
||The ID of the property of the Reference value to be returned from the native.|
JS_SetCallReturnValue2 indicates to the runtime that the native will return a value of type Reference.
The native must store the object part of the Reference value in
*rval, and the argument
v gives the ID of the property part of the Reference value. This Reference value can then be used as an lvalue in script.
An example is in
js/src/js.c; searching for
JS_SetCallReturnValue2 should find it.