Back out Bug 622315 due to Bug 662200.
authorKyle Huey <khuey@kylehuey.com>
Sun, 05 Jun 2011 16:22:09 -0700
changeset 70576 068197c2a88ec96bf0e40f369dc482b3e62eb63c
parent 70574 24e35780bd8f8ca2763b4dad8f6c79cc849457d5 (current diff)
parent 70575 6538a7bba28b6cca133bcc2f761b7095f0db4ab5 (diff)
child 70577 caf81a228fff6685fc6f673251ada3f0f300b109
push id20363
push userkhuey@mozilla.com
push dateSun, 05 Jun 2011 23:22:34 +0000
treeherdermozilla-central@068197c2a88e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs622315, 662200
milestone7.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
Back out Bug 622315 due to Bug 662200.
--- a/docshell/shistory/src/nsSHistory.cpp
+++ b/docshell/shistory/src/nsSHistory.cpp
@@ -711,45 +711,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;
 }