Navigation Menu

Skip to content

Commit

Permalink
use a stronger atomic guarantee when cancelling tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
gterzian committed Jun 20, 2020
1 parent 8e3b4b6 commit 58259c1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions components/script/dom/window.rs
Expand Up @@ -396,7 +396,7 @@ impl Window {
let flag = ignore_flags
.entry(task_source_name)
.or_insert(Default::default());
flag.store(true, Ordering::Relaxed);
flag.store(true, Ordering::SeqCst);
}
}

Expand Down Expand Up @@ -1428,7 +1428,7 @@ impl Window {
.entry(task_source_name)
.or_insert(Default::default());
let cancelled = mem::replace(&mut *flag, Default::default());
cancelled.store(true, Ordering::Relaxed);
cancelled.store(true, Ordering::SeqCst);
}
}

Expand All @@ -1441,7 +1441,7 @@ impl Window {
.entry(task_source_name)
.or_insert(Default::default());
let cancelled = mem::replace(&mut *flag, Default::default());
cancelled.store(true, Ordering::Relaxed);
cancelled.store(true, Ordering::SeqCst);
}

pub fn clear_js_runtime(&self) {
Expand Down

0 comments on commit 58259c1

Please sign in to comment.