Back out bug 622315 (ffead16f25eb) due to numerous regressions. a=legneato
authorJustin Lebar <justin.lebar@gmail.com>
Mon, 10 Oct 2011 19:17:22 -0400
changeset 76313 b49b1ea08d3c7bb1397b75fc71ab8987e1c8dd22
parent 76312 9844fb4852ee4c870c639de679601e22e2c5107e
child 76314 22a3b2700d5dcd78cb6ea06bea7668dc3e1d0013
push id267
push userjlebar@mozilla.com
push dateMon, 10 Oct 2011 23:18:29 +0000
treeherdermozilla-beta@b49b1ea08d3c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslegneato
bugs622315
milestone8.0
Back out bug 622315 (ffead16f25eb) due to numerous regressions. a=legneato
docshell/shistory/src/nsSHistory.cpp
--- a/docshell/shistory/src/nsSHistory.cpp
+++ b/docshell/shistory/src/nsSHistory.cpp
@@ -793,45 +793,33 @@ nsSHistory::EvictAllContentViewers()
 //*****************************************************************************
 
 NS_IMETHODIMP
 nsSHistory::GetCanGoBack(PRBool * aCanGoBack)
 {
   NS_ENSURE_ARG_POINTER(aCanGoBack);
   *aCanGoBack = PR_FALSE;
 
-  // If there is already a pending navigation, we cannot go back.
   PRInt32 index = -1;
-  NS_ENSURE_SUCCESS(GetRequestedIndex(&index), NS_ERROR_FAILURE);
-
-  if(index != -1)
-    return NS_OK;
-
   NS_ENSURE_SUCCESS(GetIndex(&index), NS_ERROR_FAILURE);
   if(index > 0)
      *aCanGoBack = PR_TRUE;
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsSHistory::GetCanGoForward(PRBool * aCanGoForward)
 {
   NS_ENSURE_ARG_POINTER(aCanGoForward);
   *aCanGoForward = PR_FALSE;
 
-  // If there is already a pending navigation, we cannot go forward.
   PRInt32 index = -1;
   PRInt32 count = -1;
 
-  NS_ENSURE_SUCCESS(GetRequestedIndex(&index), NS_ERROR_FAILURE);
-
-  if(index != -1)
-    return NS_OK;
-
   NS_ENSURE_SUCCESS(GetIndex(&index), NS_ERROR_FAILURE);
   NS_ENSURE_SUCCESS(GetCount(&count), NS_ERROR_FAILURE);
 
   if((index >= 0) && (index < (count - 1)))
     *aCanGoForward = PR_TRUE;
 
   return NS_OK;
 }