Auto merge of #22769 - gterzian:use_thread_pool_in_resource_thread, r=nox

Use a threadpool for fetch

<!-- Please describe your changes on the following line: -->

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

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

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- 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="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22769)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2019-04-19 15:48:56 -04:00 committed by GitHub
commit c449cbb8ea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 73 additions and 35 deletions

View file

@ -13052,6 +13052,19 @@
{}
]
],
"mozilla/fetch_cannot_overwhelm_system.window.js": [
[
"mozilla/fetch_cannot_overwhelm_system.window.html",
{
"script_metadata": [
[
"title",
"Ensure multiple fetch do not crash the browser."
]
]
}
]
],
"mozilla/first-reflow-sheet-assert.html": [
[
"mozilla/first-reflow-sheet-assert.html",
@ -20057,6 +20070,10 @@
"0ba1ce0d5577de68e5e8ff3acbce52043e7dee43",
"testharness"
],
"mozilla/fetch_cannot_overwhelm_system.window.js": [
"989231e9caedd099f5212bd2f9d377c83f929a22",
"testharness"
],
"mozilla/first-reflow-sheet-assert.html": [
"268af6d333f04adc35974ca3f2e9ebb29783fd2e",
"testharness"

View file

@ -0,0 +1,3 @@
[fetch_cannot_overwhelm_system.window.html]
expected:
if os == "linux": CRASH

View file

@ -0,0 +1,15 @@
// META: title=Ensure multiple fetch do not crash the browser.
async_test(function(t) {
onload = t.step_func(function() {
var step;
var xhr
var url = '/';
t.step_timeout(t.step_func_done(), 10);
for (step = 0; step < 5000; step++) {
xhr = new XMLHttpRequest();
xhr.open('GET', url, true);
xhr.send();
}
});
});