| 254 | |
| 255 | |
| 256 | bool PyBytesProxyHandler::set(JSContext *cx, JS::HandleObject proxy, JS::HandleId id, |
| 257 | JS::HandleValue v, JS::HandleValue receiver, |
| 258 | JS::ObjectOpResult &result) const { |
| 259 | |
| 260 | // block all modifications |
| 261 | |
| 262 | PyObject *self = JS::GetMaybePtrFromReservedSlot<PyObject>(proxy, PyObjectSlot); |
| 263 | |
| 264 | PyErr_Format(PyExc_TypeError, |
| 265 | "'%.100s' object has only read-only attributes", |
| 266 | Py_TYPE(self)->tp_name); |
| 267 | |
| 268 | return result.failReadOnly(); |
| 269 | } |
| 270 | |
| 271 | bool PyBytesProxyHandler::getOwnPropertyDescriptor( |
| 272 | JSContext *cx, JS::HandleObject proxy, JS::HandleId id, |
nothing calls this directly
no outgoing calls
no test coverage detected