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

Method hasOwn

src/PyDictProxyHandler.cc:85–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83}
84
85bool PyDictProxyHandler::hasOwn(JSContext *cx, JS::HandleObject proxy, JS::HandleId id,
86 bool *bp) const {
87 PyObject *attrName = idToKey(cx, id);
88 PyObject *self = JS::GetMaybePtrFromReservedSlot<PyObject>(proxy, PyObjectSlot);
89 *bp = PyDict_Contains(self, attrName) == 1;
90 return true;
91}
92
93bool PyDictProxyHandler::getOwnEnumerablePropertyKeys(
94 JSContext *cx, JS::HandleObject proxy,

Callers 3

addEventListenerMethod · 0.45
removeEventListenerMethod · 0.45
dispatchEventMethod · 0.45

Calls 1

idToKeyFunction · 0.85

Tested by

no test coverage detected