Bug 1560941 - Stop trying to call session history listeners for reload in the child process. r=annyG
authorPeter Van der Beken <peterv@propagandism.org>
Fri, 21 Jun 2019 17:21:10 +0200
changeset 500501 d0d8b83eb7d83df964a08f3f25927c767edee354
parent 500500 509e2d810f478badfcc99c1e1c3fb892d342d500
child 500502 7a32a86eae74f36ef4e3e9cc9f93c020aa374f70
push id114165
push userpvanderbeken@mozilla.com
push dateWed, 06 Nov 2019 09:18:40 +0000
treeherdermozilla-inbound@db1ddab2985d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersannyG
bugs1560941
milestone72.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1560941 - Stop trying to call session history listeners for reload in the child process. r=annyG Differential Revision: https://phabricator.services.mozilla.com/D35656
docshell/shistory/SHistoryChild.cpp
--- a/docshell/shistory/SHistoryChild.cpp
+++ b/docshell/shistory/SHistoryChild.cpp
@@ -336,32 +336,16 @@ SHistoryChild::RemoveEntries(nsTArray<ns
 
 NS_IMETHODIMP_(void)
 SHistoryChild::RemoveFrameEntries(nsISHEntry* aEntry) {
   SendRemoveFrameEntries(static_cast<SHEntryChild*>(aEntry));
 }
 
 NS_IMETHODIMP
 SHistoryChild::Reload(uint32_t aReloadFlags) {
-  bool canNavigate = true;
-  nsAutoTObserverArray<nsWeakPtr, 2>::EndLimitedIterator iter(mListeners);
-  while (iter.HasMore()) {
-    nsCOMPtr<nsISHistoryListener> listener = do_QueryReferent(iter.GetNext());
-    if (listener) {
-      bool canceled = false;
-      listener->OnHistoryReload(&canceled);
-      if (canceled) {
-        canNavigate = false;
-      }
-    }
-  }
-  if (!canNavigate) {
-    return NS_OK;
-  }
-
   LoadSHEntryResult loadResult;
   if (!SendReload(aReloadFlags, &loadResult)) {
     return NS_ERROR_FAILURE;
   }
 
   if (loadResult.type() == LoadSHEntryResult::Tnsresult) {
     return loadResult;
   }