Function mozjs_sys::jsapi::JS_CopyOwnPropertiesAndPrivateFields

source ยท
pub unsafe extern "C" fn JS_CopyOwnPropertiesAndPrivateFields(
    cx: *mut JSContext,
    target: HandleObject,
    obj: HandleObject,
) -> bool
Expand description

Copies all own properties and private fields from |obj| to |target|. Both |obj| and |target| must not be cross-compartment wrappers because we have to enter their realms.

This function immediately enters a realm, and does not impose any restrictions on the realm of |cx|.