Function script::dom::bindings::conversions::private_from_proto_check

source ยท
pub(crate) unsafe fn private_from_proto_check(
    obj: *mut JSObject,
    cx: *mut JSContext,
    proto_check: PrototypeCheck,
) -> Result<*const c_void, ()>
Expand description

Get a *const libc::c_void for the given DOM object, unwrapping any wrapper around it first, and checking if the object is of the correct type.

Returns Err(()) if obj is an opaque security wrapper or if the object is not an object for a DOM object of the given type (as defined by the proto_id and proto_depth).