Change ignore async events ordering to SeqCst

This commit is contained in:
Connor Brewster 2016-07-08 09:00:43 -06:00
parent 3f285fd437
commit 55267560ca
2 changed files with 2 additions and 2 deletions

View file

@ -948,7 +948,7 @@ impl Window {
self.current_state.set(WindowState::Zombie); self.current_state.set(WindowState::Zombie);
*self.js_runtime.borrow_mut() = None; *self.js_runtime.borrow_mut() = None;
self.browsing_context.set(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 /// https://drafts.csswg.org/cssom-view/#dom-window-scroll

View file

@ -190,7 +190,7 @@ pub struct CancellableRunnable<T: Runnable + Send> {
impl<T: Runnable + Send> Runnable for CancellableRunnable<T> { impl<T: Runnable + Send> Runnable for CancellableRunnable<T> {
fn is_cancelled(&self) -> bool { fn is_cancelled(&self) -> bool {
self.cancelled.load(Ordering::Relaxed) self.cancelled.load(Ordering::SeqCst)
} }
fn handler(self: Box<CancellableRunnable<T>>) { fn handler(self: Box<CancellableRunnable<T>>) {