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

Unified Diff: content/child/webmessageportchannel_impl.cc

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
Index: content/child/webmessageportchannel_impl.cc
diff --git a/content/child/webmessageportchannel_impl.cc b/content/child/webmessageportchannel_impl.cc
index dbdc2f38eb66102d9b14ea952091ac530b7e976e..d9fb79e41d54e0cc31ad47f0aba4feb81f20c99c 100644
--- a/content/child/webmessageportchannel_impl.cc
+++ b/content/child/webmessageportchannel_impl.cc
@@ -165,6 +165,8 @@ void WebMessagePortChannelImpl::Init() {
DCHECK(message_port_id_ == MSG_ROUTING_NONE);
Send(new MessagePortHostMsg_CreateMessagePort(
&route_id_, &message_port_id_));
+ } else if (message_port_id_ != MSG_ROUTING_NONE) {
+ Send(new MessagePortHostMsg_ReleaseMessages(message_port_id_));
}
ChildThread::current()->GetRouter()->AddRoute(route_id_, this);

Powered by Google App Engine
This is Rietveld 408576698