Bug 630593 DocShell history gives NS_ERROR_OUT_OF_MEMORY for useGlobalHistory r=bz r=sdwilsh a2.0=mfinkle

This commit is contained in:
Benjamin Stover
2011-02-09 11:45:53 -08:00
parent 0a0a128e12
commit b48ef00537

View File

@@ -3441,6 +3441,12 @@ nsDocShell::SetUseGlobalHistory(PRBool aUseGlobalHistory)
return NS_OK;
}
// No need to initialize mGlobalHistory if IHistory is available.
nsCOMPtr<IHistory> history = services::GetHistoryService();
if (history) {
return NS_OK;
}
if (mGlobalHistory) {
return NS_OK;
}