Closed Bug 1895853 Opened 9 months ago Closed 9 months ago

[wpt-sync] Sync PR 46181 - Append service-worker body size information in BodyDataReceivedImpl

Categories

(Core :: DOM: Service Workers, task, P4)

task

Tracking

()

RESOLVED FIXED
128 Branch
Tracking Status
firefox128 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 46181 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/46181
Details from upstream follow.

Shunya Shishido <sisidovski@chromium.org> wrote:

Append service-worker body size information in BodyDataReceivedImpl

In the last CL[1], the size information of the body intercepted by
service-worker was forwareded to navigation timing. However, the total
size is appended in DocumentLoader::DecodedBodyDataReceived(), which
is called when the body load is done in the background thread. If the
background thread is not used, DocumentLoader::BodyDataReceived() is
called instead, and in that case total_body_size_from_service_worker_
is not set at all.

The background thread is used if the mime-type is text/html, but not
used for other mime-type resources. Whether the background thread is
used or not is determined in
DocumentLoader::MaybeStartLoadingBodyInBackground()[2].

This CL moves the code from DecodedBodyDataReceived() to
BodyDataReceivedImpl(), which is called from both BodyDataReceived()
and DecodedBodyDataReceived().

https://crbug.com/41494176#comment18 has more context.

[1] crrev.com/c/5463285
[2] https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/loader/document_loader.cc;l=3499-3520;drc=b74be264a68fdb02cb216ad60ea610562d2f800d;bpv=1;bpt=1

Bug: 334977808
Change-Id: Ib1ab987a011c5a7cb983dc48d7906b96378f3a88

Reviewed-on: https://chromium-review.googlesource.com/5526558
WPT-Export-Revision: 40dda6b3503775738cdbec1f9f463c0c29ab1a38

Component: web-platform-tests → DOM: Service Workers
Product: Testing → Core

CI Results

Ran 0 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 1 tests and 3 subtests

Status Summary

Firefox

OK : 1
FAIL: 3

Chrome

OK : 1
PASS: 2
FAIL: 1

Safari

OK : 1
PASS: 2
FAIL: 1

Links

GitHub PR Head
GitHub PR Base

Details

Firefox-only Failures

New Tests That Don't Pass

Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6bc5173c8be3 [wpt PR 46181] - Append service-worker body size information in BodyDataReceivedImpl, a=testonly https://hg.mozilla.org/integration/autoland/rev/49407ca74c00 [wpt PR 46181] - Update wpt metadata, a=testonly
Status: NEW → RESOLVED
Closed: 9 months ago
Resolution: --- → FIXED
Target Milestone: --- → 128 Branch
You need to log in before you can comment on or make changes to this bug.