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

Issue 737833002: Properly queue messages sent to message ports that are transferred to a service worker. (Closed)

Created:
6 years, 1 month ago by Marijn Kruisselbrink
Modified:
6 years, 1 month ago
Reviewers:
michaeln, falken, jam, Tom Sepez
CC:
chromium-reviews, michaeln, jsbell+serviceworker_chromium.org, tzik, serviceworker-reviews, jam, kinuko+serviceworker, nhiroki, darin-cc_chromium.org, mkwst+moarreviews-renderer_chromium.org, horo+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@cross_process_messaging_with_terminate
Project:
chromium
Visibility:
Public.

Description

Properly queue messages sent to message ports that are transferred to a service worker. There can be some delay between the message port being transferred to the browser process and the renderer for the service worker being available, so this change makes sure that during this period messages sent to these message ports are queued, rather than get lost/cause assertions to fail. Additionally, ports that are send to these ports while they are queued will be similarly delayed, and thus also need to be put in this special state. Finally when for some reason launching the service worker fails all these ports (that are not associated with any renderer) need to be cleaned up, which might have to happen asynchronously, since the source renderer process might not have finished sending the message queue for this port yet. Some layout tests for this are in https://codereview.chromium.org/729923004/ BUG=432678 Committed: https://crrev.com/ddb153288a99ad6be14b88244bfa070e612580f9 Cr-Commit-Position: refs/heads/master@{#305120}

Patch Set 1 #

Patch Set 2 : more complete fix #

Patch Set 3 : better cleanup in case of errors #

Total comments: 2

Patch Set 4 : rebase #

Patch Set 5 : improve comment #

Total comments: 2

Patch Set 6 : format and comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+149 lines, -10 lines) Patch
M content/browser/message_port_message_filter.cc View 1 chunk +3 lines, -0 lines 0 comments Download
M content/browser/message_port_service.h View 1 2 3 4 2 chunks +15 lines, -0 lines 0 comments Download
M content/browser/message_port_service.cc View 1 2 3 4 5 8 chunks +90 lines, -7 lines 0 comments Download
M content/browser/service_worker/service_worker_version.h View 1 chunk +5 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_version.cc View 1 2 3 chunks +28 lines, -3 lines 0 comments Download
M content/child/webmessageportchannel_impl.cc View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M content/common/message_port_messages.h View 1 2 3 4 5 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 17 (7 generated)
Marijn Kruisselbrink
jam: I don't know who the best reviewer/owner is for these MessagePortService changes, but you ...
6 years, 1 month ago (2014-11-19 01:03:09 UTC) #4
Marijn Kruisselbrink
+falken, since apparently michaeln is on vacation
6 years, 1 month ago (2014-11-19 19:04:41 UTC) #6
falken
lgtm for service worker https://codereview.chromium.org/737833002/diff/80001/content/browser/message_port_service.h File content/browser/message_port_service.h (right): https://codereview.chromium.org/737833002/diff/80001/content/browser/message_port_service.h#newcode50 content/browser/message_port_service.h:50: // code doing isn't able ...
6 years, 1 month ago (2014-11-20 03:42:43 UTC) #7
Marijn Kruisselbrink
jam: can you please take a look, or redirect to somebody that can? https://codereview.chromium.org/737833002/diff/80001/content/browser/message_port_service.h File ...
6 years, 1 month ago (2014-11-20 22:14:44 UTC) #8
jam
On 2014/11/20 22:14:44, Marijn Kruisselbrink wrote: > jam: can you please take a look, or ...
6 years, 1 month ago (2014-11-20 22:36:48 UTC) #9
Marijn Kruisselbrink
+tsepez for RPC OWNERS https://codereview.chromium.org/737833002/diff/120001/content/browser/message_port_service.cc File content/browser/message_port_service.cc (right): https://codereview.chromium.org/737833002/diff/120001/content/browser/message_port_service.cc#newcode286 content/browser/message_port_service.cc:286: { On 2014/11/20 22:36:47, jam ...
6 years, 1 month ago (2014-11-20 23:15:27 UTC) #12
Tom Sepez
Messages LGTM.
6 years, 1 month ago (2014-11-20 23:23:48 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/737833002/160001
6 years, 1 month ago (2014-11-20 23:29:21 UTC) #15
commit-bot: I haz the power
Committed patchset #6 (id:160001)
6 years, 1 month ago (2014-11-21 00:31:29 UTC) #16
commit-bot: I haz the power
6 years, 1 month ago (2014-11-21 00:32:15 UTC) #17
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/ddb153288a99ad6be14b88244bfa070e612580f9
Cr-Commit-Position: refs/heads/master@{#305120}

Powered by Google App Engine
This is Rietveld 408576698