Use specific negative assertion for DOM bindings utils

This commit is contained in:
CYBAI 2018-01-26 02:07:27 +08:00
parent 86b876c52e
commit 1f9ce9e5d7

View file

@ -115,7 +115,7 @@ unsafe impl Sync for DOMJSClass {}
/// Fails if `global` is not a DOM global object.
pub fn get_proto_or_iface_array(global: *mut JSObject) -> *mut ProtoOrIfaceArray {
unsafe {
assert!(((*get_object_class(global)).flags & JSCLASS_DOM_GLOBAL) != 0);
assert_ne!(((*get_object_class(global)).flags & JSCLASS_DOM_GLOBAL), 0);
JS_GetReservedSlot(global, DOM_PROTOTYPE_SLOT).to_private() as *mut ProtoOrIfaceArray
}
}