| 86 | } |
| 87 | |
| 88 | void PyObjectProxyHandler::finalize(JS::GCContext *gcx, JSObject *proxy) const { |
| 89 | // We cannot call Py_DECREF here when shutting down as the thread state is gone. |
| 90 | // Then, when shutting down, there is only on reference left, and we don't need |
| 91 | // to free the object since the entire process memory is being released. |
| 92 | if (!Py_IsFinalizing()) { |
| 93 | PyObject *self = JS::GetMaybePtrFromReservedSlot<PyObject>(proxy, PyObjectSlot); |
| 94 | Py_DECREF(self); |
| 95 | } |
| 96 | } |
| 97 | |
| 98 | bool PyObjectProxyHandler::ownPropertyKeys(JSContext *cx, JS::HandleObject proxy, JS::MutableHandleIdVector props) const { |
| 99 | PyObject *self = JS::GetMaybePtrFromReservedSlot<PyObject>(proxy, PyObjectSlot); |
nothing calls this directly
no outgoing calls
no test coverage detected