Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update encoded/decoded body length for service-worker responses #37257

Merged
merged 1 commit into from
Dec 12, 2022

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented Nov 30, 2022

Instead of relying on the network, count the bytes as they
come in and use the sum as the metric, only for service-worker
responses.

Corresponds to the relevant spec change:
https://w3c.github.io/ServiceWorker/#dom-fetchevent-respondwith
(search for "encoded size")
and to proposed spec change:
whatwg/fetch#1556

Bug: 925239
Change-Id: I7d47c4febef61a89128cc50003f9f2058f3c1270
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4065971
Commit-Queue: Noam Rosenthal <[email protected]>
Reviewed-by: Yoav Weiss <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1081848}

Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review process for this patch is being conducted in the Chromium project.

@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-4065971 branch 3 times, most recently from f588061 to 243d4e2 Compare December 4, 2022 12:25
Comment on lines 32 to 33
if (mode === "cors")
assert_greater_than(entry.decodedBodySize, 0);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is redundant with the asserts above I think.

@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-4065971 branch 3 times, most recently from e4bcda3 to 4bb2793 Compare December 12, 2022 11:28
Instead of relying on the network, count the bytes as they
come in and use the sum as the metric, only for service-worker
responses.

Corresponds to the relevant spec change:
https://w3c.github.io/ServiceWorker/#dom-fetchevent-respondwith
(search for "encoded size")
and to proposed spec change:
whatwg/fetch#1556

Bug: 925239
Change-Id: I7d47c4febef61a89128cc50003f9f2058f3c1270
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4065971
Commit-Queue: Noam Rosenthal <[email protected]>
Reviewed-by: Yoav Weiss <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1081848}
@chromium-wpt-export-bot chromium-wpt-export-bot merged commit 998e292 into master Dec 12, 2022
@chromium-wpt-export-bot chromium-wpt-export-bot deleted the chromium-export-cl-4065971 branch December 12, 2022 17:43
annevk added a commit to whatwg/fetch that referenced this pull request Jan 25, 2023
The encoded/decoded body size relate to the resource, not to the timing.

Tests: web-platform-tests/wpt#37884 & web-platform-tests/wpt#37257.

This is part of w3c/resource-timing#220 (comment).

Co-authored-by: Anne van Kesteren <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants