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

Issue 1243353002: Skip the Service Worker CORS fallback for same origin requests. [1/2 blink] (Closed)

Created:
5 years, 5 months ago by horo
Modified:
5 years, 3 months ago
CC:
blink-reviews, tyoshino+watch_chromium.org, Nate Chapin, gavinp+loader_chromium.org, serviceworker-reviews
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Skip the Service Worker CORS fallback for same origin requests. [1/2 blink] We are sending CORS fallback response from the browser process to the page's renderer process, when the ServiceWorker doesn't handle the CORS fetch request. But when the request URL's origin is same as the page's security origin, we can skip the fallback and send the request from the browser process. This cl only changes ASSERT() in DocumentThreadableLoader. This cl adds "securityOrigin()->canRequest(m_fallbackRequestForServiceWorker->url())" in ASSERT(). It is OK because: - The document which origin is an unique origin can't be controlled by Service Worker. - Whenever "provider_host_->document_url().GetOrigin() == request()->url().GetOrigin()" is true at ServiceWorkerURLRequestJob::DidDispatchFetchEvent(), canRequest() must be true here. 1/2 blink: this cl. 2/2 chromium: https://codereview.chromium.org/1242953007/ BUG=512764 Committed: https://crrev.com/5d83ca9b0d1849cc0d2bd0d6bb503ea564924e4f git-svn-id: svn://svn.chromium.org/blink/trunk@199655 bbb929c8-8fbe-4397-9dbb-9b2b20218538

Patch Set 1 : #

Total comments: 3

Patch Set 2 : incorporated tyoshino's comment #

Total comments: 2

Patch Set 3 : add link to crbug.com/336894 #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -1 line) Patch
M Source/core/loader/DocumentThreadableLoader.cpp View 1 2 1 chunk +11 lines, -1 line 5 comments Download

Messages

Total messages: 22 (5 generated)
horo
tyoshino@ Could you please review this?
5 years, 5 months ago (2015-07-22 09:25:48 UTC) #3
tyoshino (SeeGerritForStatus)
https://codereview.chromium.org/1243353002/diff/20001/Source/core/loader/DocumentThreadableLoader.cpp File Source/core/loader/DocumentThreadableLoader.cpp (right): https://codereview.chromium.org/1243353002/diff/20001/Source/core/loader/DocumentThreadableLoader.cpp#newcode455 Source/core/loader/DocumentThreadableLoader.cpp:455: // |m_fallbackRequestForServiceWorker| may be set only wheh the request ...
5 years, 5 months ago (2015-07-22 11:25:45 UTC) #4
horo
Thank you! https://codereview.chromium.org/1243353002/diff/20001/Source/core/loader/DocumentThreadableLoader.cpp File Source/core/loader/DocumentThreadableLoader.cpp (right): https://codereview.chromium.org/1243353002/diff/20001/Source/core/loader/DocumentThreadableLoader.cpp#newcode457 Source/core/loader/DocumentThreadableLoader.cpp:457: // origin requests. On 2015/07/22 11:25:45, tyoshino ...
5 years, 5 months ago (2015-07-22 14:28:09 UTC) #5
falken
https://codereview.chromium.org/1243353002/diff/40001/Source/core/loader/DocumentThreadableLoader.cpp File Source/core/loader/DocumentThreadableLoader.cpp (right): https://codereview.chromium.org/1243353002/diff/40001/Source/core/loader/DocumentThreadableLoader.cpp#newcode463 Source/core/loader/DocumentThreadableLoader.cpp:463: // Suborigins for Service Worker. Can you link to ...
5 years, 5 months ago (2015-07-22 22:05:56 UTC) #7
horo
https://codereview.chromium.org/1243353002/diff/40001/Source/core/loader/DocumentThreadableLoader.cpp File Source/core/loader/DocumentThreadableLoader.cpp (right): https://codereview.chromium.org/1243353002/diff/40001/Source/core/loader/DocumentThreadableLoader.cpp#newcode463 Source/core/loader/DocumentThreadableLoader.cpp:463: // Suborigins for Service Worker. On 2015/07/22 22:05:56, falken ...
5 years, 5 months ago (2015-07-23 03:33:56 UTC) #8
tyoshino (SeeGerritForStatus)
https://codereview.chromium.org/1243353002/diff/60001/Source/core/loader/DocumentThreadableLoader.cpp File Source/core/loader/DocumentThreadableLoader.cpp (right): https://codereview.chromium.org/1243353002/diff/60001/Source/core/loader/DocumentThreadableLoader.cpp#newcode464 Source/core/loader/DocumentThreadableLoader.cpp:464: ASSERT(!m_fallbackRequestForServiceWorker || securityOrigin()->canRequest(m_fallbackRequestForServiceWorker->url())); have you investigated carefully that this ...
5 years, 5 months ago (2015-07-23 05:33:16 UTC) #9
horo
https://codereview.chromium.org/1243353002/diff/60001/Source/core/loader/DocumentThreadableLoader.cpp File Source/core/loader/DocumentThreadableLoader.cpp (right): https://codereview.chromium.org/1243353002/diff/60001/Source/core/loader/DocumentThreadableLoader.cpp#newcode464 Source/core/loader/DocumentThreadableLoader.cpp:464: ASSERT(!m_fallbackRequestForServiceWorker || securityOrigin()->canRequest(m_fallbackRequestForServiceWorker->url())); On 2015/07/23 05:33:16, tyoshino wrote: > ...
5 years, 5 months ago (2015-07-23 07:59:44 UTC) #10
tyoshino (SeeGerritForStatus)
https://codereview.chromium.org/1243353002/diff/60001/Source/core/loader/DocumentThreadableLoader.cpp File Source/core/loader/DocumentThreadableLoader.cpp (right): https://codereview.chromium.org/1243353002/diff/60001/Source/core/loader/DocumentThreadableLoader.cpp#newcode464 Source/core/loader/DocumentThreadableLoader.cpp:464: ASSERT(!m_fallbackRequestForServiceWorker || securityOrigin()->canRequest(m_fallbackRequestForServiceWorker->url())); On 2015/07/23 07:59:44, horo wrote: > ...
5 years, 5 months ago (2015-07-23 08:09:42 UTC) #11
horo
https://codereview.chromium.org/1243353002/diff/60001/Source/core/loader/DocumentThreadableLoader.cpp File Source/core/loader/DocumentThreadableLoader.cpp (right): https://codereview.chromium.org/1243353002/diff/60001/Source/core/loader/DocumentThreadableLoader.cpp#newcode464 Source/core/loader/DocumentThreadableLoader.cpp:464: ASSERT(!m_fallbackRequestForServiceWorker || securityOrigin()->canRequest(m_fallbackRequestForServiceWorker->url())); On 2015/07/23 08:09:42, tyoshino wrote: > ...
5 years, 5 months ago (2015-07-23 09:42:00 UTC) #12
tyoshino (SeeGerritForStatus)
lgtm https://codereview.chromium.org/1243353002/diff/60001/Source/core/loader/DocumentThreadableLoader.cpp File Source/core/loader/DocumentThreadableLoader.cpp (right): https://codereview.chromium.org/1243353002/diff/60001/Source/core/loader/DocumentThreadableLoader.cpp#newcode464 Source/core/loader/DocumentThreadableLoader.cpp:464: ASSERT(!m_fallbackRequestForServiceWorker || securityOrigin()->canRequest(m_fallbackRequestForServiceWorker->url())); On 2015/07/23 09:42:00, horo wrote: ...
5 years, 5 months ago (2015-07-23 09:50:14 UTC) #13
horo
On 2015/07/23 09:50:14, tyoshino wrote: > lgtm > > https://codereview.chromium.org/1243353002/diff/60001/Source/core/loader/DocumentThreadableLoader.cpp > File Source/core/loader/DocumentThreadableLoader.cpp (right): > ...
5 years, 5 months ago (2015-07-23 11:19:18 UTC) #14
tyoshino (SeeGerritForStatus)
Thank you. lgtm again
5 years, 5 months ago (2015-07-24 05:53:04 UTC) #15
horo
kinuko@ Could you please review this?
5 years, 4 months ago (2015-07-27 08:42:00 UTC) #17
kinuko
lgtm
5 years, 4 months ago (2015-07-28 08:30:26 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1243353002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1243353002/60001
5 years, 4 months ago (2015-07-29 09:06:24 UTC) #20
commit-bot: I haz the power
Committed patchset #3 (id:60001) as https://src.chromium.org/viewvc/blink?view=rev&revision=199655
5 years, 4 months ago (2015-07-29 10:19:28 UTC) #21
commit-bot: I haz the power
5 years, 3 months ago (2015-09-23 11:53:23 UTC) #22
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/5d83ca9b0d1849cc0d2bd0d6bb503ea564924e4f

Powered by Google App Engine
This is Rietveld 408576698