Index: content/browser/message_port_service.cc |
diff --git a/content/browser/message_port_service.cc b/content/browser/message_port_service.cc |
index 21fc76d40bc078cc216ce2525fe0b586d1903185..789e2aa36f2051e1db323ca9e2aa3602b030588a 100644 |
--- a/content/browser/message_port_service.cc |
+++ b/content/browser/message_port_service.cc |
@@ -295,6 +295,13 @@ void MessagePortService::HoldMessages(int message_port_id) { |
message_ports_[message_port_id].hold_messages_for_destination = true; |
} |
+bool MessagePortService::AreMessagesHeld(int message_port_id) { |
+ DCHECK_CURRENTLY_ON(BrowserThread::IO); |
+ if (!message_ports_.count(message_port_id)) |
+ return false; |
+ return message_ports_[message_port_id].hold_messages_for_destination; |
+} |
+ |
void MessagePortService::ClosePort(int message_port_id) { |
DCHECK_CURRENTLY_ON(BrowserThread::IO); |
if (!message_ports_.count(message_port_id)) { |