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

Issue 2506263005: Prevent a service worker from keeping itself alive by self postMessage. (Closed)

Created:
4 years, 1 month ago by Marijn Kruisselbrink
Modified:
4 years ago
Reviewers:
falken
CC:
blink-worker-reviews_chromium.org, chromium-reviews, darin-cc_chromium.org, horo+watch_chromium.org, jam, jsbell+serviceworker_chromium.org, kinuko+watch, kinuko+serviceworker, michaeln, nhiroki, serviceworker-reviews, shimazu+serviceworker_chromium.org, tzik
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Prevent a service worker from keeping itself alive by self postMessage. This changes the timeout for message events when the message was sent from a service worker to be the curent timeout of that service worker. So while a service worker can still post message to itself, this won't allow it to stay alive any longer than a single event would. BUG=647943, 648836 Committed: https://crrev.com/f88b52ec1e4aebd7c1f28b13a58bfad92d04ba94 Cr-Commit-Position: refs/heads/master@{#436393}

Patch Set 1 #

Patch Set 2 : fix unit test #

Total comments: 12

Patch Set 3 : Get rid of browser test. #

Patch Set 4 : address further comments #

Patch Set 5 : cleanup #

Patch Set 6 : rebase #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+77 lines, -22 lines) Patch
M content/browser/service_worker/service_worker_dispatcher_host.h View 1 2 3 3 chunks +3 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_dispatcher_host.cc View 1 2 3 4 chunks +31 lines, -6 lines 0 comments Download
M content/browser/service_worker/service_worker_dispatcher_host_unittest.cc View 1 6 chunks +30 lines, -16 lines 0 comments Download
M content/browser/service_worker/service_worker_version.h View 1 2 3 4 5 2 chunks +11 lines, -0 lines 1 comment Download
M content/browser/service_worker/service_worker_version.cc View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 33 (24 generated)
Marijn Kruisselbrink
My initial attempt at implementing linking the timeout of message events to the timeout of ...
4 years, 1 month ago (2016-11-18 01:01:18 UTC) #5
falken
I think this is a fine approach. I suppose the next steps will be to ...
4 years, 1 month ago (2016-11-21 08:01:48 UTC) #13
Marijn Kruisselbrink
On 2016/11/21 at 08:01:48, falken wrote: > I suppose the next steps will be to ...
4 years ago (2016-12-01 19:54:30 UTC) #16
falken
This patch lgtm. "One problem with CONTINUE_ON_TIMEOUT and IPC based events (such as currently the ...
4 years ago (2016-12-05 02:31:51 UTC) #25
falken
OK I now learned about ServiceWorkerDisaptcherHost::kFilteredMessageClasses, so the BadMessageReceived is not necessarily incorrect. It still ...
4 years ago (2016-12-05 03:32:22 UTC) #26
Marijn Kruisselbrink
On 2016/12/05 at 03:32:22, falken wrote: > OK I now learned about ServiceWorkerDisaptcherHost::kFilteredMessageClasses, so the ...
4 years ago (2016-12-05 18:35:17 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2506263005/120001
4 years ago (2016-12-05 18:35:56 UTC) #29
commit-bot: I haz the power
Committed patchset #6 (id:120001)
4 years ago (2016-12-05 20:42:49 UTC) #31
commit-bot: I haz the power
4 years ago (2016-12-05 20:44:42 UTC) #33
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/f88b52ec1e4aebd7c1f28b13a58bfad92d04ba94
Cr-Commit-Position: refs/heads/master@{#436393}

Powered by Google App Engine
This is Rietveld 408576698