Commit 5b4fdb8d authored by Matt Falkenhagen's avatar Matt Falkenhagen Committed by Commit Bot

service worker: Initialize response type to kDefault.

Follow-up to r777235. Aligns with blink::ResourceResponse. It's
impractical to audit all network::mojom::URLResponseHead::New() sites
but I expect it's safe.

It looks like the default changed around Aug 2019 with these CLs:
- https://chromium-review.googlesource.com/c/chromium/src/+/1742782
- https://chromium-review.googlesource.com/c/chromium/src/+/1953671

Change-Id: If179612f23f0f4dbbaa1c2db2da9ebc1bb092e89
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2387038Reviewed-by: default avatarKinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Matt Falkenhagen <falken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#804644}
parent d0af7765
......@@ -132,13 +132,7 @@ struct URLResponseHead {
array<url.mojom.Url> url_list_via_service_worker;
// https://fetch.spec.whatwg.org/#concept-response-type
//
// TODO(falken): Initialize to kDefault per spec, if that doesn't
// break things. Previously this field was not being initialized
// explicitly, so it was zero-initializing which happens to be the
// kBasic type. So changing it to kDefault could potentially change
// behavior.
FetchResponseType response_type = FetchResponseType.kBasic;
FetchResponseType response_type = FetchResponseType.kDefault;
// The cache name of the CacheStorage from where the response is served via
// the ServiceWorker. Empty if the response isn't from the CacheStorage.
......
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