diff --git a/mozjs/src/rust.rs b/mozjs/src/rust.rs index 35189e8806..002fbc50fc 100644 --- a/mozjs/src/rust.rs +++ b/mozjs/src/rust.rs @@ -431,9 +431,8 @@ impl Runtime { impl Drop for Runtime { fn drop(&mut self) { self.thread_safe_handle.write().unwrap().take(); - assert_eq!( - Arc::strong_count(&self.outstanding_children), - 1, + assert!( + Arc::get_mut(&mut self.outstanding_children).is_some(), "This runtime still has live children." ); unsafe {