Back out bug 622315 (ffead16f25eb) due to numerous regressions. r=bz

--HG--
extra : rebase_source : c4047ba2db97ebd31ae8dbbbd4d6e7057abf67fe
This commit is contained in:
Justin Lebar 2011-10-03 17:43:36 -04:00
parent e707b2f190
commit 49b4c57c62

View File

@ -798,13 +798,7 @@ nsSHistory::GetCanGoBack(bool * 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;
@ -818,15 +812,9 @@ nsSHistory::GetCanGoForward(bool * 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);