pub unsafe extern "C" fn JS_CopyOwnPropertiesAndPrivateFields(
    cx: *mut JSContext,
    target: Handle<*mut JSObject>,
    obj: Handle<*mut JSObject>,
) -> 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|.