This article covers features introduced in SpiderMonkey 1.8.5
Please provide a description for this function.
void JS_SetCompartmentPrivate(JSCompartment *compartment, void *data); void * JS_GetCompartmentPrivate(JSCompartment *compartment);
JSCompartment has a field of type
void * which the application may use for any purpose. It is especially useful for storing data needed by callbacks.
JS_GetCompartmentPrivate gets this field and
JS_SetCompartmentPrivate sets it. The field is initially