diff --git a/components/script/dom/window.rs b/components/script/dom/window.rs index 34ac683e233e..ad90cc73b31d 100644 --- a/components/script/dom/window.rs +++ b/components/script/dom/window.rs @@ -948,7 +948,7 @@ impl Window { self.current_state.set(WindowState::Zombie); *self.js_runtime.borrow_mut() = None; self.browsing_context.set(None); - self.ignore_further_async_events.store(true, Ordering::Relaxed); + self.ignore_further_async_events.store(true, Ordering::SeqCst); } /// https://drafts.csswg.org/cssom-view/#dom-window-scroll diff --git a/components/script/script_thread.rs b/components/script/script_thread.rs index e115d0869565..e116ace1be41 100644 --- a/components/script/script_thread.rs +++ b/components/script/script_thread.rs @@ -190,7 +190,7 @@ pub struct CancellableRunnable { impl Runnable for CancellableRunnable { fn is_cancelled(&self) -> bool { - self.cancelled.load(Ordering::Relaxed) + self.cancelled.load(Ordering::SeqCst) } fn handler(self: Box>) {