Auto merge of #12277 - ConnorGBrewster:network_listener_cancellable, r=Manishearth

Make network listener runnable cancellable

<!-- Please describe your changes on the following line: -->
This keeps scripts from executing after its script thread has been shut down.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [x] These changes fix (maybe) #12048 (github issue number if applicable).

<!-- Either: -->
- [X] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12277)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2016-07-08 09:56:31 -07:00 committed by GitHub
commit 12260b24d0
11 changed files with 60 additions and 7 deletions

View file

@ -949,7 +949,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