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

Issue 832813002: [ServiceWorker] Keep ServiceWorker alive while streaming the response for FetchEvent. (Closed)

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

Description

[ServiceWorker] Keep ServiceWorker alive while streaming the response for FetchEvent. In current implementation the ServiceWorker is terminated 30 seconds after start loading the page even if the page is still loading. (https://codereview.chromium.org/805083006/ changed the behavior of stopping the ServiceWorker.) This cl changes ServiceWorkerVersion::HasInflightRequests() to check the existence of the active streaming ServiceWorkerURLRequestJobs. BUG=445775 Committed: https://crrev.com/4bffcd598dd89e0016208ce9312a1f477ff105d1 Cr-Commit-Position: refs/heads/master@{#309970}

Patch Set 1 #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+56 lines, -2 lines) Patch
M content/browser/service_worker/service_worker_url_request_job.cc View 2 chunks +6 lines, -0 lines 5 comments Download
M content/browser/service_worker/service_worker_url_request_job_unittest.cc View 8 chunks +22 lines, -1 line 0 comments Download
M content/browser/service_worker/service_worker_version.h View 5 chunks +12 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_version.cc View 3 chunks +16 lines, -1 line 0 comments Download

Messages

Total messages: 16 (5 generated)
horo
kinuko@ Could you please review this?
5 years, 11 months ago (2015-01-05 06:58:52 UTC) #4
kinuko
Thanks for fixing this! https://codereview.chromium.org/832813002/diff/40001/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/832813002/diff/40001/content/browser/service_worker/service_worker_url_request_job.cc#newcode542 content/browser/service_worker/service_worker_url_request_job.cc:542: provider_host_->active_version()->AddStreamingURLRequestJob(this); Should we just always ...
5 years, 11 months ago (2015-01-05 08:26:04 UTC) #5
horo
https://codereview.chromium.org/832813002/diff/40001/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/832813002/diff/40001/content/browser/service_worker/service_worker_url_request_job.cc#newcode542 content/browser/service_worker/service_worker_url_request_job.cc:542: provider_host_->active_version()->AddStreamingURLRequestJob(this); On 2015/01/05 08:26:04, kinuko wrote: > Should we ...
5 years, 11 months ago (2015-01-05 08:31:33 UTC) #6
kinuko
https://codereview.chromium.org/832813002/diff/40001/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/832813002/diff/40001/content/browser/service_worker/service_worker_url_request_job.cc#newcode542 content/browser/service_worker/service_worker_url_request_job.cc:542: provider_host_->active_version()->AddStreamingURLRequestJob(this); On 2015/01/05 08:31:32, horo wrote: > On 2015/01/05 ...
5 years, 11 months ago (2015-01-05 14:08:21 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/832813002/40001
5 years, 11 months ago (2015-01-05 22:08:54 UTC) #9
commit-bot: I haz the power
Committed patchset #1 (id:40001)
5 years, 11 months ago (2015-01-05 22:21:27 UTC) #10
commit-bot: I haz the power
Patchset 1 (id:??) landed as https://crrev.com/4bffcd598dd89e0016208ce9312a1f477ff105d1 Cr-Commit-Position: refs/heads/master@{#309970}
5 years, 11 months ago (2015-01-05 22:22:35 UTC) #11
michaeln
https://codereview.chromium.org/832813002/diff/40001/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/832813002/diff/40001/content/browser/service_worker/service_worker_url_request_job.cc#newcode87 content/browser/service_worker/service_worker_url_request_job.cc:87: if (ServiceWorkerVersion* active_version = provider_host_->active_version()) couple of things i ...
5 years, 11 months ago (2015-01-07 21:48:46 UTC) #13
horo
https://codereview.chromium.org/832813002/diff/40001/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/832813002/diff/40001/content/browser/service_worker/service_worker_url_request_job.cc#newcode87 content/browser/service_worker/service_worker_url_request_job.cc:87: if (ServiceWorkerVersion* active_version = provider_host_->active_version()) On 2015/01/07 21:48:46, michaeln ...
5 years, 11 months ago (2015-01-08 04:04:03 UTC) #14
michaeln
> Is my understanding incorrect? Maybe, hard to be sure? I guess in the expected ...
5 years, 11 months ago (2015-01-08 23:04:25 UTC) #15
horo
5 years, 11 months ago (2015-01-09 04:57:52 UTC) #16
Message was sent while issue was closed.
On 2015/01/08 23:04:25, michaeln wrote:
> > Is my understanding incorrect?
> 
> Maybe, hard to be sure? I guess in the expected case it works out. No data on
> various test harnesses or in exceptional cases or in the face future changes
to
> various far removed classes.
> 
> Depending on the detailed behavior you described of a long series of distant
> classes seems brittle. Looks like the code can be rearranged without too much
> trouble to not rely on Kill() always being called and always prior to the host
> being deleted. I think it'd be an improvement to make it more obviously air
> tight. Wdyt?

Yes, I agree.
I created a patch: https://codereview.chromium.org/844913002/
Please review it.

Powered by Google App Engine
This is Rietveld 408576698