Use specific assertion for DOM binding refcounted

This commit is contained in:
CYBAI 2018-01-25 23:49:17 +08:00
parent 1c31370a08
commit 9ee27d62ae

View file

@ -98,7 +98,7 @@ impl TrustedPromise {
LIVE_REFERENCES.with(|ref r| {
let r = r.borrow();
let live_references = r.as_ref().unwrap();
assert!(self.owner_thread == (&*live_references) as *const _ as *const libc::c_void);
assert_eq!(self.owner_thread, (&*live_references) as *const _ as *const libc::c_void);
// Borrow-check error requires the redundant `let promise = ...; promise` here.
let promise = match live_references.promise_table.borrow_mut().entry(self.dom_object) {
Occupied(mut entry) => {