Skip to content

Commit

Permalink
Change ignore async events ordering to SeqCst
Browse files Browse the repository at this point in the history
  • Loading branch information
cbrewster committed Jul 8, 2016
1 parent 3f285fd commit 5526756
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion components/script/dom/window.rs
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion components/script/script_thread.rs
Expand Up @@ -190,7 +190,7 @@ pub struct CancellableRunnable<T: Runnable + Send> {

impl<T: Runnable + Send> Runnable for CancellableRunnable<T> {
fn is_cancelled(&self) -> bool {
self.cancelled.load(Ordering::Relaxed)
self.cancelled.load(Ordering::SeqCst)
}

fn handler(self: Box<CancellableRunnable<T>>) {
Expand Down

0 comments on commit 5526756

Please sign in to comment.