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

Issue 2027583002: service worker: Avoid starting up for activation during shutdown (Closed)

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

Description

service worker: Avoid starting up for activation during shutdown Activation is prone to start failures due to browser shutdown, since it's triggered when tabs close. This patch: - Delays activation for a second, when triggered by tab close - Tries to detect when shutdown happened when activation fails BUG=600226 Committed: https://crrev.com/6daa334159472055f2d967e17cc8de3bc98ff232 Cr-Commit-Position: refs/heads/master@{#397649}

Patch Set 1 #

Patch Set 2 : rm irrevlant #

Patch Set 3 : maybe fix win #

Total comments: 13

Patch Set 4 : rebase #

Patch Set 5 : comments #

Total comments: 2

Patch Set 6 : commetns #

Patch Set 7 : revised appraoach #

Patch Set 8 : rebase #

Patch Set 9 : add unittest #

Unified diffs Side-by-side diffs Delta from patch set Stats (+207 lines, -26 lines) Patch
M content/browser/service_worker/service_worker_job_unittest.cc View 1 2 3 4 5 6 7 8 9 chunks +81 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_metrics.h View 1 2 3 4 5 6 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/service_worker/service_worker_metrics.cc View 1 2 3 4 5 6 1 chunk +9 lines, -1 line 0 comments Download
M content/browser/service_worker/service_worker_process_manager.h View 1 2 3 4 5 6 4 chunks +13 lines, -5 lines 0 comments Download
M content/browser/service_worker/service_worker_process_manager.cc View 1 2 3 4 5 6 2 chunks +10 lines, -1 line 0 comments Download
M content/browser/service_worker/service_worker_registration.h View 1 2 3 4 5 6 6 chunks +23 lines, -6 lines 0 comments Download
M content/browser/service_worker/service_worker_registration.cc View 1 2 3 4 5 6 9 chunks +55 lines, -11 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 6 7 2 chunks +14 lines, -1 line 0 comments Download

Messages

Total messages: 27 (7 generated)
falken
nhiroki: can you review of this?
4 years, 6 months ago (2016-05-31 10:15:33 UTC) #2
nhiroki
https://codereview.chromium.org/2027583002/diff/40001/base/compiler_specific.h File base/compiler_specific.h (right): https://codereview.chromium.org/2027583002/diff/40001/base/compiler_specific.h#newcode58 base/compiler_specific.h:58: #define NON_EXPORTED_BASE(...) \ Why do we need this change? ...
4 years, 6 months ago (2016-06-01 05:51:48 UTC) #3
falken
Updated https://codereview.chromium.org/2027583002/diff/40001/base/compiler_specific.h File base/compiler_specific.h (right): https://codereview.chromium.org/2027583002/diff/40001/base/compiler_specific.h#newcode58 base/compiler_specific.h:58: #define NON_EXPORTED_BASE(...) \ On 2016/06/01 05:51:47, nhiroki wrote: ...
4 years, 6 months ago (2016-06-01 09:20:05 UTC) #4
falken
danakj: can you review base/? mpearson: can you review histograms?
4 years, 6 months ago (2016-06-01 09:25:50 UTC) #6
danakj
On 2016/06/01 09:25:50, falken wrote: > danakj: can you review base/? Can you explain why ...
4 years, 6 months ago (2016-06-01 17:57:18 UTC) #7
Mark P
https://codereview.chromium.org/2027583002/diff/80001/tools/metrics/histograms/histograms.xml File tools/metrics/histograms/histograms.xml (right): https://codereview.chromium.org/2027583002/diff/80001/tools/metrics/histograms/histograms.xml#newcode96701 tools/metrics/histograms/histograms.xml:96701: + <affected-histogram name="ServiceWorker.ActivateEventStatus"/> Please revise the histogram description to ...
4 years, 6 months ago (2016-06-01 21:10:42 UTC) #8
falken
On 2016/06/01 17:57:18, danakj wrote: > On 2016/06/01 09:25:50, falken wrote: > > danakj: can ...
4 years, 6 months ago (2016-06-01 22:50:01 UTC) #9
danakj
On 2016/06/01 22:50:01, falken wrote: > On 2016/06/01 17:57:18, danakj wrote: > > On 2016/06/01 ...
4 years, 6 months ago (2016-06-01 23:01:49 UTC) #10
falken
I (with nhiroki's help) investigated the thread safety issue more. It looks like callbacks posted ...
4 years, 6 months ago (2016-06-02 07:12:33 UTC) #11
kinuko
Maybe just use WeakPtr and let someone else (e.g. service_worker_context) hold references while waiting to ...
4 years, 6 months ago (2016-06-02 09:27:48 UTC) #12
falken
On 2016/06/02 09:27:48, kinuko wrote: > Maybe just use WeakPtr and let someone else (e.g. ...
4 years, 6 months ago (2016-06-02 09:42:57 UTC) #13
falken
Updated with new approach. This uses ref counting with Bind as usual, and the dtor ...
4 years, 6 months ago (2016-06-02 12:17:24 UTC) #15
Mark P
histograms.xml lgtm
4 years, 6 months ago (2016-06-02 17:05:38 UTC) #16
danakj
On Thu, Jun 2, 2016 at 2:42 AM, <falken@chromium.org> wrote: > On 2016/06/02 09:27:48, kinuko ...
4 years, 6 months ago (2016-06-02 17:57:46 UTC) #17
nhiroki
lgtm https://codereview.chromium.org/2027583002/diff/40001/content/browser/service_worker/service_worker_registration.h File content/browser/service_worker/service_worker_registration.h (right): https://codereview.chromium.org/2027583002/diff/40001/content/browser/service_worker/service_worker_registration.h#newcode178 content/browser/service_worker/service_worker_registration.h:178: const scoped_refptr<ServiceWorkerVersion>& activating_version); On 2016/06/01 09:20:05, falken wrote: ...
4 years, 6 months ago (2016-06-03 00:54:30 UTC) #18
falken
nhiroki: I added a new unit test. Can you review it please?
4 years, 6 months ago (2016-06-03 01:47:15 UTC) #20
nhiroki
lgtm
4 years, 6 months ago (2016-06-03 02:14:05 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2027583002/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2027583002/180001
4 years, 6 months ago (2016-06-03 02:16:42 UTC) #24
commit-bot: I haz the power
Committed patchset #9 (id:180001)
4 years, 6 months ago (2016-06-03 06:40:48 UTC) #25
commit-bot: I haz the power
4 years, 6 months ago (2016-06-03 06:43:21 UTC) #27
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/6daa334159472055f2d967e17cc8de3bc98ff232
Cr-Commit-Position: refs/heads/master@{#397649}

Powered by Google App Engine
This is Rietveld 408576698