From 9ee27d62aedaa59cf14c362cca5b62cb7e291ccc Mon Sep 17 00:00:00 2001 From: CYBAI Date: Thu, 25 Jan 2018 23:49:17 +0800 Subject: [PATCH] Use specific assertion for DOM binding refcounted --- components/script/dom/bindings/refcounted.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/script/dom/bindings/refcounted.rs b/components/script/dom/bindings/refcounted.rs index b189298c30e..2c5a179ca2b 100644 --- a/components/script/dom/bindings/refcounted.rs +++ b/components/script/dom/bindings/refcounted.rs @@ -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) => {