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

Issue 2108573002: ServiceWorker: Add an API to fallback to renderer for CORS preflight (Closed)

Created:
4 years, 5 months ago by shimazu
Modified:
4 years, 5 months ago
CC:
chromium-reviews, michaeln, jsbell+serviceworker_chromium.org, tzik, serviceworker-reviews, jam, kinuko+serviceworker, nhiroki, darin-cc_chromium.org, blink-reviews, horo+watch_chromium.org, kinuko+watch, blink-worker-reviews_chromium.org, falken
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

ServiceWorker: Add an API to fallback to renderer for CORS preflight Currently ServiceWorkerURLRequestJob::ForwardToNetwork invokes restart of the request and the request goes to the network directly. In subresource case, this causes an bug when the request needs CORS preflight. This patch adds an API to fallback with CORS check for subresources; this is used at a subsequent patch: aka no-fetch optimization http://crrev.com/2103063002. BUG=621788, 605844 Committed: https://crrev.com/e14963a7be1f6445401efb43619301bf9fe3157d Cr-Commit-Position: refs/heads/master@{#404114}

Patch Set 1 #

Total comments: 11

Patch Set 2 : Add FallbackToNetworkOrRenderer and move a test to another CL #

Total comments: 10

Patch Set 3 : Add comments and rename functions #

Total comments: 4

Patch Set 4 : Update comment and move the check of foreign fetch #

Total comments: 4

Patch Set 5 : Use FallbackToNetwork and update the comment #

Total comments: 6

Patch Set 6 : Fix grammatical problems on the comments #

Patch Set 7 : Fix grammatical problems on the comments #

Patch Set 8 : Remove dependency #

Unified diffs Side-by-side diffs Delta from patch set Stats (+91 lines, -30 lines) Patch
M content/browser/service_worker/service_worker_url_request_job.h View 1 2 3 4 5 3 chunks +23 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_url_request_job.cc View 1 2 3 4 5 6 chunks +68 lines, -30 lines 0 comments Download

Messages

Total messages: 41 (17 generated)
shimazu
PTAL:) Note: http://crrev.com/2103063002 is a subsequent CL.
4 years, 5 months ago (2016-06-28 08:36:52 UTC) #2
horo
https://codereview.chromium.org/2108573002/diff/1/content/browser/service_worker/service_worker_url_request_job.cc File content/browser/service_worker/service_worker_url_request_job.cc (right): https://codereview.chromium.org/2108573002/diff/1/content/browser/service_worker/service_worker_url_request_job.cc#newcode251 content/browser/service_worker/service_worker_url_request_job.cc:251: void ServiceWorkerURLRequestJob::FallbackToNetwork() { This function name should be FallbackToNetworkOrRenderer(). ...
4 years, 5 months ago (2016-06-29 05:31:36 UTC) #3
falken
+hiroshige ^^^
4 years, 5 months ago (2016-06-29 05:55:17 UTC) #5
hiroshige
https://codereview.chromium.org/2108573002/diff/1/third_party/WebKit/LayoutTests/http/tests/fetch/resources/thorough-util.js File third_party/WebKit/LayoutTests/http/tests/fetch/resources/thorough-util.js (right): https://codereview.chromium.org/2108573002/diff/1/third_party/WebKit/LayoutTests/http/tests/fetch/resources/thorough-util.js#newcode25 third_party/WebKit/LayoutTests/http/tests/fetch/resources/thorough-util.js:25: var EMPTY_WORKER_URL = '/fetch/resources/empty-worker.js' Do we need |BASE_ORIGIN +| ...
4 years, 5 months ago (2016-06-29 16:12:47 UTC) #6
shimazu
Updated. PTAL again:) https://codereview.chromium.org/2108573002/diff/1/content/browser/service_worker/service_worker_url_request_job.cc File content/browser/service_worker/service_worker_url_request_job.cc (right): https://codereview.chromium.org/2108573002/diff/1/content/browser/service_worker/service_worker_url_request_job.cc#newcode251 content/browser/service_worker/service_worker_url_request_job.cc:251: void ServiceWorkerURLRequestJob::FallbackToNetwork() { On 2016/06/29 05:31:35, ...
4 years, 5 months ago (2016-07-04 06:31:12 UTC) #8
falken
driveby nits on the header file https://codereview.chromium.org/2108573002/diff/40001/content/browser/service_worker/service_worker_url_request_job.h File content/browser/service_worker/service_worker_url_request_job.h (right): https://codereview.chromium.org/2108573002/diff/40001/content/browser/service_worker/service_worker_url_request_job.h#newcode107 content/browser/service_worker/service_worker_url_request_job.h:107: void FallbackToNetworkOrRenderer(); Please ...
4 years, 5 months ago (2016-07-04 08:23:02 UTC) #9
horo
lgtm Please incorporate with falken's comment.
4 years, 5 months ago (2016-07-05 01:58:00 UTC) #10
shimazu
https://codereview.chromium.org/2108573002/diff/40001/content/browser/service_worker/service_worker_url_request_job.h File content/browser/service_worker/service_worker_url_request_job.h (right): https://codereview.chromium.org/2108573002/diff/40001/content/browser/service_worker/service_worker_url_request_job.h#newcode107 content/browser/service_worker/service_worker_url_request_job.h:107: void FallbackToNetworkOrRenderer(); On 2016/07/04 08:23:02, falken wrote: > Please ...
4 years, 5 months ago (2016-07-05 03:33:58 UTC) #11
falken
Sorry to come to this review late. https://codereview.chromium.org/2108573002/diff/1/content/browser/service_worker/service_worker_url_request_job.cc File content/browser/service_worker/service_worker_url_request_job.cc (right): https://codereview.chromium.org/2108573002/diff/1/content/browser/service_worker/service_worker_url_request_job.cc#newcode251 content/browser/service_worker/service_worker_url_request_job.cc:251: void ServiceWorkerURLRequestJob::FallbackToNetwork() ...
4 years, 5 months ago (2016-07-05 06:49:28 UTC) #12
shimazu
falken@, PTAL again? https://codereview.chromium.org/2108573002/diff/1/content/browser/service_worker/service_worker_url_request_job.cc File content/browser/service_worker/service_worker_url_request_job.cc (right): https://codereview.chromium.org/2108573002/diff/1/content/browser/service_worker/service_worker_url_request_job.cc#newcode251 content/browser/service_worker/service_worker_url_request_job.cc:251: void ServiceWorkerURLRequestJob::FallbackToNetwork() { On 2016/07/05 06:49:28, ...
4 years, 5 months ago (2016-07-06 06:27:35 UTC) #13
falken
https://codereview.chromium.org/2108573002/diff/80001/content/browser/service_worker/service_worker_controllee_request_handler.cc File content/browser/service_worker/service_worker_controllee_request_handler.cc (right): https://codereview.chromium.org/2108573002/diff/80001/content/browser/service_worker/service_worker_controllee_request_handler.cc#newcode288 content/browser/service_worker/service_worker_controllee_request_handler.cc:288: job_->FallbackToNetworkOrRenderer(); Sorry I no longer understand this. We only ...
4 years, 5 months ago (2016-07-07 01:11:12 UTC) #14
shimazu
https://codereview.chromium.org/2108573002/diff/80001/content/browser/service_worker/service_worker_controllee_request_handler.cc File content/browser/service_worker/service_worker_controllee_request_handler.cc (right): https://codereview.chromium.org/2108573002/diff/80001/content/browser/service_worker/service_worker_controllee_request_handler.cc#newcode288 content/browser/service_worker/service_worker_controllee_request_handler.cc:288: job_->FallbackToNetworkOrRenderer(); On 2016/07/07 01:11:12, falken wrote: > Sorry I ...
4 years, 5 months ago (2016-07-07 05:02:32 UTC) #15
falken
I think this lg to me now. If I understand correctly, there is no behavior ...
4 years, 5 months ago (2016-07-07 05:15:35 UTC) #16
shimazu
On 2016/07/07 05:15:35, falken wrote: > I think this lg to me now. If I ...
4 years, 5 months ago (2016-07-07 05:39:46 UTC) #18
horo
still lgtm thanks
4 years, 5 months ago (2016-07-07 06:03:57 UTC) #19
commit-bot: I haz the power
This CL has an open dependency (Issue 2116373002 Patch 1). Please resolve the dependency and ...
4 years, 5 months ago (2016-07-07 06:04:44 UTC) #22
falken
lgtm but first line of CL description seems wrong. This patch is basically adding an ...
4 years, 5 months ago (2016-07-07 06:05:30 UTC) #23
shimazu
Thanks, updated the first line. https://codereview.chromium.org/2108573002/diff/100001/content/browser/service_worker/service_worker_url_request_job.cc File content/browser/service_worker/service_worker_url_request_job.cc (right): https://codereview.chromium.org/2108573002/diff/100001/content/browser/service_worker/service_worker_url_request_job.cc#newcode267 content/browser/service_worker/service_worker_url_request_job.cc:267: DCHECK(fetch_type_ != ServiceWorkerFetchType::FOREIGN_FETCH); On ...
4 years, 5 months ago (2016-07-07 06:23:52 UTC) #26
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/2108573002/140001
4 years, 5 months ago (2016-07-07 06:32:51 UTC) #30
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/251288)
4 years, 5 months ago (2016-07-07 07:47:59 UTC) #32
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/2108573002/160001
4 years, 5 months ago (2016-07-07 08:21:44 UTC) #36
commit-bot: I haz the power
Committed patchset #8 (id:160001)
4 years, 5 months ago (2016-07-07 09:32:02 UTC) #38
commit-bot: I haz the power
CQ bit was unchecked.
4 years, 5 months ago (2016-07-07 09:32:11 UTC) #39
commit-bot: I haz the power
4 years, 5 months ago (2016-07-07 09:34:03 UTC) #41
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/e14963a7be1f6445401efb43619301bf9fe3157d
Cr-Commit-Position: refs/heads/master@{#404114}

Powered by Google App Engine
This is Rietveld 408576698