Skip to content

Commit

Permalink
Use specific negative assertion for DOM globalscope
Browse files Browse the repository at this point in the history
  • Loading branch information
CYBAI committed Jan 25, 2018
1 parent 5475059 commit 1ba2b67
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/script/dom/globalscope.rs
Expand Up @@ -610,6 +610,6 @@ fn timestamp_in_ms(time: Timespec) -> u64 {
unsafe fn global_scope_from_global(global: *mut JSObject) -> DomRoot<GlobalScope> {
assert!(!global.is_null());
let clasp = get_object_class(global);
assert!(((*clasp).flags & (JSCLASS_IS_DOMJSCLASS | JSCLASS_IS_GLOBAL)) != 0);
assert_ne!(((*clasp).flags & (JSCLASS_IS_DOMJSCLASS | JSCLASS_IS_GLOBAL)), 0);
root_from_object(global).unwrap()
}

0 comments on commit 1ba2b67

Please sign in to comment.