Commit b97951a5 authored by Ben Kelly's avatar Ben Kelly Committed by Commit Bot

Fetch: Enable BufferingBytesConsumerDelay by default.

This CL also fixes a content_browsertest test case that assumed the
fetch response body would be immediately drained.

Bug: 954442
Change-Id: I22c41758150f427072f18c3ac79a82a1f9678f28
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1736868Reviewed-by: default avatarJohn Abd-El-Malek <jam@chromium.org>
Commit-Queue: Ben Kelly <wanderview@chromium.org>
Cr-Commit-Position: refs/heads/master@{#684083}
parent 1df2052b
...@@ -10,8 +10,8 @@ function wait25ms() { ...@@ -10,8 +10,8 @@ function wait25ms() {
// runTest() will be called by the browser test. // runTest() will be called by the browser test.
async function runTest() { async function runTest() {
const url = 'stale-script.js'; const url = 'stale-script.js';
const response = await fetch(url); const response = await fetch(url).then(r => r.text());
const response2 = await fetch(url); const response2 = await fetch(url).then(r => r.text());
while(true) { while(true) {
const revalidation_check = await fetch('stale-script.js'); const revalidation_check = await fetch('stale-script.js');
if (performance.getEntriesByName(new URL(url, document.location)).length == 2) { if (performance.getEntriesByName(new URL(url, document.location)).length == 2) {
......
...@@ -379,7 +379,7 @@ const base::Feature kBlinkHeapUnifiedGCScheduling{ ...@@ -379,7 +379,7 @@ const base::Feature kBlinkHeapUnifiedGCScheduling{
// Enables a delay before BufferingBytesConsumer begins reading from its // Enables a delay before BufferingBytesConsumer begins reading from its
// underlying consumer when instantiated with CreateWithDelay(). // underlying consumer when instantiated with CreateWithDelay().
const base::Feature kBufferingBytesConsumerDelay{ const base::Feature kBufferingBytesConsumerDelay{
"BufferingBytesConsumerDelay", base::FEATURE_DISABLED_BY_DEFAULT}; "BufferingBytesConsumerDelay", base::FEATURE_ENABLED_BY_DEFAULT};
const base::FeatureParam<int> kBufferingBytesConsumerDelayMilliseconds{ const base::FeatureParam<int> kBufferingBytesConsumerDelayMilliseconds{
&kBufferingBytesConsumerDelay, "milliseconds", 50}; &kBufferingBytesConsumerDelay, "milliseconds", 50};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment