MCPcopy Create free account
hub / github.com/Distributive-Network/PythonMonkey / hasOwn

Method hasOwn

src/PyObjectProxyHandler.cc:174–180  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

172}
173
174bool PyObjectProxyHandler::hasOwn(JSContext *cx, JS::HandleObject proxy, JS::HandleId id,
175 bool *bp) const {
176 PyObject *attrName = idToKey(cx, id);
177 PyObject *self = JS::GetMaybePtrFromReservedSlot<PyObject>(proxy, PyObjectSlot);
178 *bp = PyObject_HasAttr(self, attrName) == 1;
179 return true;
180}
181
182bool PyObjectProxyHandler::getOwnEnumerablePropertyKeys(
183 JSContext *cx, JS::HandleObject proxy,

Callers

nothing calls this directly

Calls 1

idToKeyFunction · 0.85

Tested by

no test coverage detected