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

Issue 739383002: Don't drop messages/events send to a service worker that is stopping. (Closed)

Created:
6 years, 1 month ago by Marijn Kruisselbrink
Modified:
6 years ago
CC:
chromium-reviews, michaeln, 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@termnate_sw
Project:
chromium
Visibility:
Public.

Description

Don't drop messages/events send to a service worker that is stopping. Currently ServiceWorkerVersion drops any messages that are sent while the service worker is in STOPPING state. In particular messages send to the service worker using postMessage are never delivered if the service worker is currently in the STOPPING state. The same situation will happen if any other subsystem happens to try to deliver an event to a service worker while the service worker is shutting down. The event delivery will fail with a "SERVICE_WORKER_ERROR_START_WORKER_FAILED" error. This fixes this by restarting the service worker as soon as it has finished stopping if some event or message is attempted to be delivered while the service worker is stopping. BUG=433439 Committed: https://crrev.com/b8f566900faccfe07b4e6a2f13629ec0554ca553 Cr-Commit-Position: refs/heads/master@{#306588}

Patch Set 1 #

Patch Set 2 : #

Total comments: 1

Patch Set 3 : rebase #

Patch Set 4 : address nit #

Unified diffs Side-by-side diffs Delta from patch set Stats (+62 lines, -48 lines) Patch
M content/browser/service_worker/embedded_worker_instance.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M content/browser/service_worker/embedded_worker_instance.cc View 1 2 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/service_worker/service_worker_browsertest.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M content/browser/service_worker/service_worker_version.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M content/browser/service_worker/service_worker_version.cc View 1 2 3 chunks +23 lines, -6 lines 0 comments Download
M content/browser/service_worker/service_worker_version_unittest.cc View 1 2 3 3 chunks +34 lines, -38 lines 0 comments Download

Messages

Total messages: 8 (2 generated)
Marijn Kruisselbrink
As I mentioned in the bug report for this, I have no idea if this ...
6 years, 1 month ago (2014-11-20 21:55:53 UTC) #2
falken
I think this lgtm. Can you revise the CL description a bit to explain why ...
6 years ago (2014-11-25 15:46:04 UTC) #3
Marijn Kruisselbrink
On 2014/11/25 15:46:04, falken wrote: > I think this lgtm. Can you revise the CL ...
6 years ago (2014-12-03 11:38:05 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/739383002/60001
6 years ago (2014-12-03 11:38:36 UTC) #6
commit-bot: I haz the power
Committed patchset #4 (id:60001)
6 years ago (2014-12-03 11:40:51 UTC) #7
commit-bot: I haz the power
6 years ago (2014-12-03 11:41:36 UTC) #8
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/b8f566900faccfe07b4e6a2f13629ec0554ca553
Cr-Commit-Position: refs/heads/master@{#306588}

Powered by Google App Engine
This is Rietveld 408576698