| 733 | } |
| 734 | |
| 735 | PyObject *JSObjectProxyMethodDefinitions::JSObjectProxy_copy_method(JSObjectProxy *self) { |
| 736 | JS::Rooted<JS::ValueArray<2>> args(GLOBAL_CX); |
| 737 | args[0].setObjectOrNull(JS_NewPlainObject(GLOBAL_CX)); |
| 738 | args[1].setObjectOrNull(*(self->jsObject)); |
| 739 | |
| 740 | JS::RootedObject global(GLOBAL_CX, JS::GetNonCCWObjectGlobal(*(self->jsObject))); |
| 741 | |
| 742 | // call Object.assign |
| 743 | JS::RootedValue Object(GLOBAL_CX); |
| 744 | if (!JS_GetProperty(GLOBAL_CX, global, "Object", &Object)) { |
| 745 | PyErr_Format(PyExc_SystemError, "%s JSAPI call failed", JSObjectProxyType.tp_name); |
| 746 | return NULL; |
| 747 | } |
| 748 | |
| 749 | JS::RootedObject rootedObject(GLOBAL_CX, Object.toObjectOrNull()); |
| 750 | JS::RootedValue ret(GLOBAL_CX); |
| 751 | if (!JS_CallFunctionName(GLOBAL_CX, rootedObject, "assign", args, &ret)) { |
| 752 | PyErr_Format(PyExc_SystemError, "%s JSAPI call failed", JSObjectProxyType.tp_name); |
| 753 | return NULL; |
| 754 | } |
| 755 | return pyTypeFactory(GLOBAL_CX, ret); |
| 756 | } |
| 757 | |
| 758 | PyObject *JSObjectProxyMethodDefinitions::JSObjectProxy_update_method(JSObjectProxy *self, PyObject *args, PyObject *kwds) { |
| 759 | PyObject *arg = NULL; |
nothing calls this directly
no test coverage detected