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

Unified Diff: content/browser/message_port_service.h

Issue 737833002: Properly queue messages sent to message ports that are transferred to a service worker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cross_process_messaging_with_terminate
Patch Set: better cleanup in case of errors Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/message_port_message_filter.cc ('k') | content/browser/message_port_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/message_port_service.h
diff --git a/content/browser/message_port_service.h b/content/browser/message_port_service.h
index 668959167f724e79ebfd914042438fb0128b5060..78dea8a820bef577b613c7864a72682458fb07bc 100644
--- a/content/browser/message_port_service.h
+++ b/content/browser/message_port_service.h
@@ -37,6 +37,7 @@ class MessagePortService {
void QueueMessages(int message_port_id);
void SendQueuedMessages(int message_port_id,
const QueuedMessages& queued_messages);
+ void ReleaseMessages(int message_port_id);
// Updates the information needed to reach a message port when it's sent to a
// (possibly different) process.
@@ -45,6 +46,17 @@ class MessagePortService {
MessagePortMessageFilter* filter,
int routing_id);
+ // The message port is being transferred to a new renderer process, but the
+ // code doing isn't able to immediately update the message port with a new
falken 2014/11/20 03:42:43 "code doing that"?
Marijn Kruisselbrink 2014/11/20 22:14:43 Done.
+ // filter and routing_id. This queues up all messages sent to this port until
+ // later ReleaseMessages is called for this port. If ultimately transfering
+ // the port to a new process fails, ClosePost should be called to clean up the
+ // port.
+ void HoldMessages(int message_port_id);
+
+ // Closes and cleans up the message port.
+ void ClosePort(int message_port_id);
+
void OnMessagePortMessageFilterClosing(MessagePortMessageFilter* filter);
// Attempts to send the queued messages for a message port.
« no previous file with comments | « content/browser/message_port_message_filter.cc ('k') | content/browser/message_port_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698