Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(466)

Issue 2177283006: Do not reuse opaque Resource from a service worker for non no-cors requests (Closed)

Created:
4 years, 4 months ago by hiroshige
Modified:
4 years, 4 months ago
CC:
blink-reviews, gavinp+loader_chromium.org, Nate Chapin, tyoshino+watch_chromium.org, Yoav Weiss
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Do not reuse opaque Resource from a service worker for non no-cors requests RespondWithObserver::responseWasFulfilled() rejects FetchResponseData::OpaqueType for requests that are not WebURLRequest::FetchRequestModeNoCORS, but this check is not in MemoryCache. BUG=625575 Committed: https://crrev.com/77317690ae5f0d6e60ea0b2693085ed5b9b2df09 Cr-Commit-Position: refs/heads/master@{#410052}

Patch Set 1 #

Patch Set 2 : Reject Opaque response + non-no-cors requests only #

Patch Set 3 : Comment #

Total comments: 2

Patch Set 4 : Add tests, reflect comments #

Messages

Total messages: 16 (6 generated)
hiroshige
PTAL. This corresponds to https://cs.chromium.org/chromium/src/third_party/WebKit/Source/modules/serviceworkers/RespondWithObserver.cpp?q=RespondWithObserver&sq=package:chromium&l=230. If we should also merge another condition in RespondWithObserver::responseWasFulfilled(), or ...
4 years, 4 months ago (2016-07-28 04:01:54 UTC) #4
horo
https://codereview.chromium.org/2177283006/diff/40001/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp File third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp (right): https://codereview.chromium.org/2177283006/diff/40001/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp#newcode698 third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp:698: if (existingResource->response().serviceWorkerResponseType() == WebServiceWorkerResponseTypeOpaque && request.fetchRequestMode() != WebURLRequest::FetchRequestModeNoCORS) I ...
4 years, 4 months ago (2016-07-28 07:29:00 UTC) #5
Mike West
Can you add a test for this behavior?
4 years, 4 months ago (2016-07-28 09:03:27 UTC) #6
hiroshige
Added layout tests. PTAL. https://codereview.chromium.org/2177283006/diff/40001/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp File third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp (right): https://codereview.chromium.org/2177283006/diff/40001/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp#newcode698 third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp:698: if (existingResource->response().serviceWorkerResponseType() == WebServiceWorkerResponseTypeOpaque && ...
4 years, 4 months ago (2016-08-05 07:53:14 UTC) #7
Mike West
LGTM
4 years, 4 months ago (2016-08-05 10:52:25 UTC) #8
horo
lgtm
4 years, 4 months ago (2016-08-05 12:07:00 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2177283006/60001
4 years, 4 months ago (2016-08-05 12:20:41 UTC) #11
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 4 months ago (2016-08-05 14:06:23 UTC) #13
commit-bot: I haz the power
Patchset 4 (id:??) landed as https://crrev.com/77317690ae5f0d6e60ea0b2693085ed5b9b2df09 Cr-Commit-Position: refs/heads/master@{#410052}
4 years, 4 months ago (2016-08-05 14:07:56 UTC) #15
tyoshino (SeeGerritForStatus)
4 years, 4 months ago (2016-08-09 06:42:58 UTC) #16
Message was sent while issue was closed.
lgtm

Powered by Google App Engine
This is Rietveld 408576698