NS_ENSURE_STATE(mSessionHistory); NS_ENSURE_TRUE(!IsFrame(), NS_ERROR_FAILURE);  NS_ENSURE_SUCCESS(mSessionHistory->GetIndex(&aResult), NS_ERROR_FAILURE); return NS_OK;
nsWebShell::GetHistoryIndex(PRInt32& aResult){   NS_ENSURE_STATE(mSessionHistory);   NS_ENSURE_TRUE(!IsFrame(), NS_ERROR_FAILURE);      NS_ENSURE_SUCCESS(mSessionHistory->GetIndex(&aResult), NS_ERROR_FAILURE);   return NS_OK;}