| 716 | } |
| 717 | |
| 718 | PyObject *JSObjectProxyMethodDefinitions::JSObjectProxy_clear_method(JSObjectProxy *self) { |
| 719 | JS::RootedIdVector props(GLOBAL_CX); |
| 720 | if (!js::GetPropertyKeys(GLOBAL_CX, *(self->jsObject), JSITER_OWNONLY, &props)) |
| 721 | { |
| 722 | PyErr_Format(PyExc_SystemError, "%s JSAPI call failed", JSObjectProxyType.tp_name); |
| 723 | return NULL; |
| 724 | } |
| 725 | |
| 726 | JS::ObjectOpResult ignoredResult; |
| 727 | size_t length = props.length(); |
| 728 | for (size_t index = 0; index < length; index++) { |
| 729 | JS_DeletePropertyById(GLOBAL_CX, *(self->jsObject), props[index], ignoredResult); |
| 730 | } |
| 731 | |
| 732 | Py_RETURN_NONE; |
| 733 | } |
| 734 | |
| 735 | PyObject *JSObjectProxyMethodDefinitions::JSObjectProxy_copy_method(JSObjectProxy *self) { |
| 736 | JS::Rooted<JS::ValueArray<2>> args(GLOBAL_CX); |
nothing calls this directly
no outgoing calls
no test coverage detected