[wpt-sync] Sync PR 46181 - Append service-worker body size information in BodyDataReceivedImpl
Categories
(Core :: DOM: Service Workers, task, P4)
Tracking
()
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 inDocumentLoader::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 casetotal_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 bothBodyDataReceived()
andDecodedBodyDataReceived()
.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=1Bug: 334977808
Change-Id: Ib1ab987a011c5a7cb983dc48d7906b96378f3a88Reviewed-on: https://chromium-review.googlesource.com/5526558
WPT-Export-Revision: 40dda6b3503775738cdbec1f9f463c0c29ab1a38
Assignee | ||
Updated•9 months ago
|
Assignee | ||
Comment 1•9 months ago
|
||
Assignee | ||
Comment 2•9 months ago
|
||
Assignee | ||
Comment 3•9 months ago
|
||
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
Details
Firefox-only Failures
- /service-workers/service-worker/navigation-timing-sizes.https.html [wpt.fyi]
- Body sizes in a regular pass-through:
FAIL
- Body sizes in a regular pass-through:
New Tests That Don't Pass
- /service-workers/service-worker/navigation-timing-sizes.https.html [wpt.fyi]
- Body sizes in a regular pass-through:
FAIL
(Chrome:PASS
, Safari:PASS
) - Body sizes in a pass-through with non html content:
FAIL
(Chrome:FAIL
, Safari:PASS
) - Body sizes in a regular pass-through with gzip:
FAIL
(Chrome:PASS
, Safari:FAIL
)
- Body sizes in a regular pass-through:
https://hg.mozilla.org/mozilla-central/rev/6bc5173c8be3
https://hg.mozilla.org/mozilla-central/rev/49407ca74c00
Description
•