From 839d8942f2c57b5fd048fc8544c35de4af285436 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Qu=C3=A8ze?= Date: Wed, 15 Mar 2023 18:29:59 +0000 Subject: [PATCH] Bug 1822062 - avoid sending NotifyVisited IPCs with no URIs, r=emilio. Differential Revision: https://phabricator.services.mozilla.com/D172688 --- docshell/base/BaseHistory.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docshell/base/BaseHistory.cpp b/docshell/base/BaseHistory.cpp index 226b9d6c7c4b..3bb013653548 100644 --- a/docshell/base/BaseHistory.cpp +++ b/docshell/base/BaseHistory.cpp @@ -216,7 +216,9 @@ void BaseHistory::SendPendingVisitedResultsToChildProcesses() { resultsForProcess.AppendElement(result.mResult); } } - Unused << NS_WARN_IF(!cp->SendNotifyVisited(resultsForProcess)); + if (!resultsForProcess.IsEmpty()) { + Unused << NS_WARN_IF(!cp->SendNotifyVisited(resultsForProcess)); + } } }