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

Issue 1584653009: Change RunAfterStartWorker to not start the worker if it is already running. (Closed)

Created:
4 years, 11 months ago by Marijn Kruisselbrink
Modified:
4 years, 11 months ago
Reviewers:
johnme, jkarlin, nhiroki
CC:
blink-worker-reviews_chromium.org, chromium-reviews, darin-cc_chromium.org, horo+watch_chromium.org, jam, jkarlin+watch_chromium.org, jsbell+serviceworker_chromium.org, kinuko+serviceworker, kinuko+watch, maxbogue+watch_chromium.org, michaeln, nhiroki, plaree+watch_chromium.org, serviceworker-reviews, tim+watch_chromium.org, tzik, zea+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Change RunAfterStartWorker to not start the worker if it is already running. Also swaps the order of the two arguments to match the convention of having an error callback be the last argument. BUG=570820 Committed: https://crrev.com/ce3eb37e37d28577d748d31a65e468cbf662ba9c Cr-Commit-Position: refs/heads/master@{#370433}

Patch Set 1 #

Total comments: 5

Patch Set 2 : Fix race condition if worker is already running #

Unified diffs Side-by-side diffs Delta from patch set Stats (+20 lines, -12 lines) Patch
M content/browser/background_sync/background_sync_manager.cc View 1 chunk +4 lines, -3 lines 0 comments Download
M content/browser/geofencing/geofencing_manager.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M content/browser/navigator_connect/navigator_connect_context_impl.cc View 1 chunk +3 lines, -3 lines 0 comments Download
M content/browser/service_worker/service_worker_version.h View 1 1 chunk +4 lines, -2 lines 0 comments Download
M content/browser/service_worker/service_worker_version.cc View 1 1 chunk +7 lines, -2 lines 0 comments Download

Messages

Total messages: 23 (7 generated)
Marijn Kruisselbrink
Addresses the two issues with RunAfterStartWorker pointed out in https://codereview.chromium.org/1575283003
4 years, 11 months ago (2016-01-15 23:49:15 UTC) #2
johnme
https://codereview.chromium.org/1584653009/diff/1/content/browser/service_worker/service_worker_version.cc File content/browser/service_worker/service_worker_version.cc (right): https://codereview.chromium.org/1584653009/diff/1/content/browser/service_worker/service_worker_version.cc#newcode512 content/browser/service_worker/service_worker_version.cc:512: RunSoon(task); Using RunSoon (and hence PostTask) introduces a race ...
4 years, 11 months ago (2016-01-18 19:06:51 UTC) #4
johnme
4 years, 11 months ago (2016-01-18 19:06:54 UTC) #5
nhiroki
https://codereview.chromium.org/1584653009/diff/1/content/browser/service_worker/service_worker_version.cc File content/browser/service_worker/service_worker_version.cc (right): https://codereview.chromium.org/1584653009/diff/1/content/browser/service_worker/service_worker_version.cc#newcode512 content/browser/service_worker/service_worker_version.cc:512: RunSoon(task); On 2016/01/18 19:06:51, johnme wrote: > Using RunSoon ...
4 years, 11 months ago (2016-01-19 01:36:39 UTC) #6
Marijn Kruisselbrink
https://codereview.chromium.org/1584653009/diff/1/content/browser/service_worker/service_worker_version.cc File content/browser/service_worker/service_worker_version.cc (right): https://codereview.chromium.org/1584653009/diff/1/content/browser/service_worker/service_worker_version.cc#newcode512 content/browser/service_worker/service_worker_version.cc:512: RunSoon(task); On 2016/01/19 at 01:36:39, nhiroki wrote: > On ...
4 years, 11 months ago (2016-01-19 22:49:15 UTC) #7
nhiroki
LGTM. Do we need to merge this to M49?
4 years, 11 months ago (2016-01-20 01:53:12 UTC) #8
johnme
lgtm, thanks :)
4 years, 11 months ago (2016-01-20 12:17:17 UTC) #9
johnme
lgtm, thanks :)
4 years, 11 months ago (2016-01-20 12:17:17 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1584653009/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1584653009/20001
4 years, 11 months ago (2016-01-20 17:39:09 UTC) #12
Marijn Kruisselbrink
On 2016/01/20 at 01:53:12, nhiroki wrote: > LGTM. Do we need to merge this to ...
4 years, 11 months ago (2016-01-20 17:40:24 UTC) #13
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/137246)
4 years, 11 months ago (2016-01-20 17:48:57 UTC) #15
Marijn Kruisselbrink
+jkarlin for background_sync OWNERS
4 years, 11 months ago (2016-01-20 17:53:13 UTC) #17
jkarlin
background_sync/ lgtm
4 years, 11 months ago (2016-01-20 18:01:42 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1584653009/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1584653009/20001
4 years, 11 months ago (2016-01-20 18:04:45 UTC) #20
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 11 months ago (2016-01-20 18:38:39 UTC) #21
commit-bot: I haz the power
4 years, 11 months ago (2016-01-20 18:39:33 UTC) #23
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/ce3eb37e37d28577d748d31a65e468cbf662ba9c
Cr-Commit-Position: refs/heads/master@{#370433}

Powered by Google App Engine
This is Rietveld 408576698