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

Issue 1004913003: ServiceWorker: Don't start the timeout timer when DevTools is detached (Closed)

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

Description

ServiceWorker: Don't start the timeout timer when DevTools is detached Starting/stopping the timeout timer should be triggered in response to the lifecycle event of the service worker, that is, only StartWorker() should call StartTimeoutTimer() and only OnStopped() should call StopTimeoutTimer(). This CL removes the call of StartTimeoutTimer() from SetDevToolsAttached() and instead reactivates the timer for start timeout when DevTools is detached and the worker is still under starting phase. BUG=448003 TEST=content_unittests --gtest_filter=ServiceWorkerVersionTest.* Committed: https://crrev.com/01dab9680e4a5e82624daf0a6d758f03242361d0 Cr-Commit-Position: refs/heads/master@{#321727}

Patch Set 1 : #

Total comments: 4

Patch Set 2 : rebase #

Patch Set 3 : #

Total comments: 9

Patch Set 4 : rebase #

Patch Set 5 : #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+78 lines, -36 lines) Patch
M content/browser/service_worker/service_worker_version.h View 1 2 3 3 chunks +7 lines, -2 lines 0 comments Download
M content/browser/service_worker/service_worker_version.cc View 1 2 3 4 8 chunks +42 lines, -34 lines 2 comments Download
M content/browser/service_worker/service_worker_version_unittest.cc View 1 2 1 chunk +29 lines, -0 lines 0 comments Download

Messages

Total messages: 21 (8 generated)
nhiroki
Ptal, thanks!
5 years, 9 months ago (2015-03-13 04:51:58 UTC) #5
falken
drive-by comment It's my fault for leaving that StartTimeoutTimer call in SetDevToolsAttached. The original plan ...
5 years, 9 months ago (2015-03-13 07:14:10 UTC) #7
nhiroki
Updated. Can you take another look? https://codereview.chromium.org/1004913003/diff/40001/content/browser/service_worker/service_worker_version.cc File content/browser/service_worker/service_worker_version.cc (right): https://codereview.chromium.org/1004913003/diff/40001/content/browser/service_worker/service_worker_version.cc#newcode791 content/browser/service_worker/service_worker_version.cc:791: RestartTick(&start_time_); On 2015/03/13 ...
5 years, 9 months ago (2015-03-16 01:58:02 UTC) #9
kinuko
lgtm, but probably falken@ should take another look
5 years, 9 months ago (2015-03-16 05:16:13 UTC) #10
nhiroki
On 2015/03/16 05:16:13, kinuko wrote: > lgtm, but probably falken@ should take another look Thank ...
5 years, 9 months ago (2015-03-16 06:51:42 UTC) #11
falken
Sorry for the delayed review. https://codereview.chromium.org/1004913003/diff/120001/content/browser/service_worker/service_worker_version.cc File content/browser/service_worker/service_worker_version.cc (right): https://codereview.chromium.org/1004913003/diff/120001/content/browser/service_worker/service_worker_version.cc#newcode785 content/browser/service_worker/service_worker_version.cc:785: if (running_status() == STARTING ...
5 years, 9 months ago (2015-03-23 00:14:25 UTC) #12
nhiroki
Thank you! Updated. https://codereview.chromium.org/1004913003/diff/120001/content/browser/service_worker/service_worker_version.cc File content/browser/service_worker/service_worker_version.cc (right): https://codereview.chromium.org/1004913003/diff/120001/content/browser/service_worker/service_worker_version.cc#newcode785 content/browser/service_worker/service_worker_version.cc:785: if (running_status() == STARTING || running_status() ...
5 years, 9 months ago (2015-03-23 00:43:17 UTC) #13
falken
https://codereview.chromium.org/1004913003/diff/160001/content/browser/service_worker/service_worker_version.cc File content/browser/service_worker/service_worker_version.cc (right): https://codereview.chromium.org/1004913003/diff/160001/content/browser/service_worker/service_worker_version.cc#newcode1423 content/browser/service_worker/service_worker_version.cc:1423: RecordStartWorkerResult(status); Do we know start_time_ is null here? I ...
5 years, 9 months ago (2015-03-23 00:52:31 UTC) #14
nhiroki
https://codereview.chromium.org/1004913003/diff/160001/content/browser/service_worker/service_worker_version.cc File content/browser/service_worker/service_worker_version.cc (right): https://codereview.chromium.org/1004913003/diff/160001/content/browser/service_worker/service_worker_version.cc#newcode1423 content/browser/service_worker/service_worker_version.cc:1423: RecordStartWorkerResult(status); On 2015/03/23 00:52:31, falken wrote: > Do we ...
5 years, 9 months ago (2015-03-23 01:38:51 UTC) #15
falken
Ah right, I had been worried about recording the time. lgtm
5 years, 9 months ago (2015-03-23 01:41:10 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1004913003/160001
5 years, 9 months ago (2015-03-23 01:42:49 UTC) #19
commit-bot: I haz the power
Committed patchset #5 (id:160001)
5 years, 9 months ago (2015-03-23 02:43:11 UTC) #20
commit-bot: I haz the power
5 years, 9 months ago (2015-03-23 02:43:42 UTC) #21
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/01dab9680e4a5e82624daf0a6d758f03242361d0
Cr-Commit-Position: refs/heads/master@{#321727}

Powered by Google App Engine
This is Rietveld 408576698