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

Unified Diff: content/browser/message_port_service.cc

Issue 1799413002: ServiceWorker: Release a reference when it fails to dispatch ExtendableMessageEvent (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_dispatch_extendable_message_event
Patch Set: fix build failures Created 4 years, 9 months 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/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)) {
« no previous file with comments | « content/browser/message_port_service.h ('k') | content/browser/service_worker/embedded_worker_test_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698