fix for 44963.crash in SH while clicking in the throbber. r=rpotts@netscape.com

git-svn-id: svn://10.0.0.236/trunk@74259 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
radha%netscape.com
2000-07-14 21:06:20 +00:00
parent db1ec9cb0c
commit 9546eaefab

View File

@@ -2242,7 +2242,7 @@ NS_IMETHODIMP nsDocShell::Embed(nsIContentViewer* aContentViewer,
nsCOMPtr<nsILayoutHistoryState> layoutState;
rv = OSHE->GetLayoutHistoryState(getter_AddRefs(layoutState));
if (layoutState) {
if (layoutState && (mLoadType != nsIDocShellLoadInfo::loadNormalReplace)) {
// This is a SH load. That's why there is a LayoutHistoryState in OSHE
nsCOMPtr<nsIPresShell> presShell;
rv = GetPresShell(getter_AddRefs(presShell));
@@ -3344,7 +3344,8 @@ nsresult nsDocShell::AddToSessionHistory(nsIURI *aURI,
// will be deleted when it loses scope...
//
if (mSessionHistory) {
rv = mSessionHistory->AddEntry(entry, shouldPersist);
if (mLoadType != nsIDocShellLoadInfo::loadNormalReplace)
rv = mSessionHistory->AddEntry(entry, shouldPersist);
} else {
rv = AddChildSHEntry(nsnull, entry, mChildOffset);
}