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

Method finalize

src/PyListProxyHandler.cc:2092–2100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2090}
2091
2092void PyListProxyHandler::finalize(JS::GCContext *gcx, JSObject *proxy) const {
2093 // We cannot call Py_DECREF here when shutting down as the thread state is gone.
2094 // Then, when shutting down, there is only on reference left, and we don't need
2095 // to free the object since the entire process memory is being released.
2096 if (!Py_IsFinalizing()) {
2097 PyObject *self = JS::GetMaybePtrFromReservedSlot<PyObject>(proxy, PyObjectSlot);
2098 Py_DECREF(self);
2099 }
2100}
2101
2102bool PyListProxyHandler::defineProperty(
2103 JSContext *cx, JS::HandleObject proxy, JS::HandleId id,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected