| Index: content/browser/message_port_service.cc
|
| diff --git a/content/browser/message_port_service.cc b/content/browser/message_port_service.cc
|
| index 915ae483d3194cfdaff3501b56e1059639d386cf..31318d453b6681cf74ef85e4b4be5f2e755c5fb5 100644
|
| --- a/content/browser/message_port_service.cc
|
| +++ b/content/browser/message_port_service.cc
|
| @@ -74,6 +74,22 @@ void MessagePortService::UpdateMessagePort(int message_port_id,
|
| port.route_id = routing_id;
|
| }
|
|
|
| +void MessagePortService::GetMessagePortInfo(int message_port_id,
|
| + MessagePortDelegate** delegate,
|
| + int* routing_id) {
|
| + DCHECK_CURRENTLY_ON(BrowserThread::IO);
|
| + if (!message_ports_.count(message_port_id)) {
|
| + NOTREACHED();
|
| + return;
|
| + }
|
| +
|
| + const MessagePort& port = message_ports_[message_port_id];
|
| + if (delegate)
|
| + *delegate = port.delegate;
|
| + if (routing_id)
|
| + *routing_id = port.route_id;
|
| +}
|
| +
|
| void MessagePortService::OnMessagePortDelegateClosing(
|
| MessagePortDelegate* delegate) {
|
| DCHECK_CURRENTLY_ON(BrowserThread::IO);
|
| @@ -180,6 +196,10 @@ void MessagePortService::PostMessageTo(
|
| }
|
| entangled_port.queued_messages.push_back(
|
| std::make_pair(message, sent_message_ports));
|
| +
|
| + if (entangled_port.delegate)
|
| + entangled_port.delegate->MessageWasHeld(entangled_port.route_id);
|
| +
|
| return;
|
| }
|
|
|
|
|