bug 1524359 - 49,600 instances of "NS_ENSURE_SUCCESS(rv, false) failed with result 0x80004005" emitted from docshell/shistory/nsSHistory.cpp during linux64 debug testing r=peterv
authorKhyati Agarwal <f20160385@hyderabad.bits-pilani.ac.in>
Thu, 11 Apr 2019 12:11:05 +0000
changeset 469028 e251a566abb693ee0f12419bf52b39fe4df7a7f3
parent 469027 515b1710f38763c0b499f981570cddd87005f6fa
child 469029 c91bf0806ef7a167f28984e21befd0c3947b15e3
push id112769
push usercsabou@mozilla.com
push dateFri, 12 Apr 2019 03:51:12 +0000
treeherdermozilla-inbound@9ab47be2e004 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspeterv
bugs1524359
milestone68.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 1524359 - 49,600 instances of "NS_ENSURE_SUCCESS(rv, false) failed with result 0x80004005" emitted from docshell/shistory/nsSHistory.cpp during linux64 debug testing r=peterv Replaced "NS_ENSURE_SUCCESS" with 'if' condition Differential Revision: https://phabricator.services.mozilla.com/D25529
docshell/shistory/nsSHistory.cpp
--- a/docshell/shistory/nsSHistory.cpp
+++ b/docshell/shistory/nsSHistory.cpp
@@ -1190,19 +1190,23 @@ bool nsSHistory::RemoveDuplicate(int32_t
                "If we're removing index 0 we must be keeping the next");
   NS_ASSERTION(aIndex != mIndex, "Shouldn't remove mIndex!");
 
   int32_t compareIndex = aKeepNext ? aIndex + 1 : aIndex - 1;
 
   nsresult rv;
   nsCOMPtr<nsISHEntry> root1, root2;
   rv = GetEntryAtIndex(aIndex, getter_AddRefs(root1));
-  NS_ENSURE_SUCCESS(rv, false);
+  if (NS_FAILED(rv)) {
+    return false;
+  }
   rv = GetEntryAtIndex(compareIndex, getter_AddRefs(root2));
-  NS_ENSURE_SUCCESS(rv, false);
+  if (NS_FAILED(rv)) {
+    return false;
+  }
 
   if (IsSameTree(root1, root2)) {
     mEntries.RemoveElementAt(aIndex);
 
     if (mRootDocShell) {
       static_cast<nsDocShell*>(mRootDocShell)->HistoryEntryRemoved(aIndex);
     }