static bool XPC_WN_NoMods_Proto_Resolve(JSContext* cx, HandleObject obj, HandleId id, bool* resolvedp) { MOZ_ASSERT(js::GetObjectClass(obj) == &XPC_WN_NoMods_Proto_JSClass, "bad proto"); XPCWrappedNativeProto* self = (XPCWrappedNativeProto*) xpc_GetJSPrivate(obj); if (!self) return false; XPCCallContext ccx(cx); if (!ccx.IsValid()) return false; XPCNativeScriptableInfo* si = self->GetScriptableInfo(); return DefinePropertyIfFound(ccx, obj, id, self->GetSet(), nullptr, nullptr, self->GetScope(), true, nullptr, nullptr, si, JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_ENUMERATE, resolvedp); }