use a threadpool for fetch

This commit is contained in:
Gregory Terzian 2019-01-27 20:20:32 +08:00
parent 1e4b42a90b
commit c52cfda957
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();
}
});
});