Retrieves the class associated with an object.
const JSClass * JS_GetClass(JSObject *obj);
||Any context associated with the runtime in which
||Object to get the class from.|
JS_GetClasstook both a
JSObject*as arguments in thread-safe builds, and in non-thread-safe builds it took only a
JSObject*. The JS_GET_CLASS(cx, obj)macro abstracted away this detail. Newer versions have removed the context argument, so that the same signature is used regardless whether or not the build is thread-safe.
JS_GetClass returns a pointer to the
JSClass associated with a specified JS object,
obj. The application must treat the
JSClass as read-only. If
obj has no
JSClass, this returns