js_DefineOwnProperty(JSContext *cx, JSObject *objArg, jsid idArg, JS::Handle<js::PropertyDescriptor> descriptor, bool *bp) { RootedObject obj(cx, objArg); RootedId id(cx, idArg); js::AssertHeapIsIdle(cx); CHECK_REQUEST(cx); assertSameCompartment(cx, obj, id, descriptor.value()); if (descriptor.hasGetterObject()) assertSameCompartment(cx, descriptor.getterObject()); if (descriptor.hasSetterObject()) assertSameCompartment(cx, descriptor.setterObject()); return DefineOwnProperty(cx, HandleObject(obj), id, descriptor, bp); }