Bug 665964: If the nsISHistoryListener vetoes navigation, reset mRequestedIndex to make it clear that the navigation has been cancelled. r=bz

This commit is contained in:
Kyle Huey 2011-07-08 14:30:36 -07:00
parent 2f0d968154
commit 1e6f7c8c73

View File

@ -1496,6 +1496,7 @@ nsSHistory::LoadEntry(PRInt32 aIndex, long aLoadType, PRUint32 aHistCmd)
if (!canNavigate) {
// If the listener asked us not to proceed with
// the operation, simply return.
mRequestedIndex = -1;
return NS_OK; // XXX Maybe I can return some other error code?
}