Auto merge of #15189 - jdm:microtasks, r=nox

Implement microtask checkpoints

This generalizes the work previously done for Promise job callbacks. There is now a microtask queue that correctly processes all queued microtasks after each turn of the event loop, as well as after a scripted callback finishes executing, and after a classic script executes.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #4283
- [X] There are tests for these changes

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15189)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-02-03 07:53:17 -08:00 committed by GitHub
commit cbcafd18f4
14 changed files with 340 additions and 307 deletions

View file

@ -1,6 +0,0 @@
[microtask_after_raf.html]
type: testharness
disabled: https://github.com/servo/servo/issues/13501
[Microtask execute immediately after script]
expected: FAIL

View file

@ -1,5 +0,0 @@
[microtask_after_script.html]
type: testharness
[Microtask immediately after script]
expected: FAIL

View file

@ -1,8 +1,5 @@
[task_microtask_ordering.html]
type: testharness
[Basic task and microtask ordering]
expected: FAIL
[Level 1 bossfight (synthetic click)]
expected: FAIL
bug: https://github.com/servo/servo/issues/1980