Remove the extra AddRef to nsHistoryLayoutState. r=pollmann, bug #16496

This commit is contained in:
radha%netscape.com 1999-11-01 21:47:54 +00:00
Родитель 19413247cc
Коммит 2d60762adc
2 изменённых файлов: 2 добавлений и 14 удалений

Просмотреть файл

@ -2300,8 +2300,7 @@ nsWebShell::LoadURL(const PRUnichar *aURLSpec,
* session History, it will be set to the cached history object by
* session History.
*/
if (aHistoryState)
SetHistoryState(aHistoryState);
SetHistoryState(aHistoryState);
/*
* Set mURL to spec so that session history can get
@ -2729,11 +2728,6 @@ nsWebShell::GetHistoryState(nsISupports** aLayoutHistoryState)
rv = docv->GetPresShell(*getter_AddRefs(shell));
if (NS_SUCCEEDED(rv)) {
rv = shell->GetHistoryState((nsILayoutHistoryState**) aLayoutHistoryState);
/* The following line was added by mistake in one of the previous checkins. It
* causes a leak of nsHistorylayoutState. But removing it causes a crash.
* Eric Pollmann(pollmann@netscape.com) is investigating it. Bug # 16496
*/
NS_ADDREF(*aLayoutHistoryState);
}
}
}

Просмотреть файл

@ -2300,8 +2300,7 @@ nsWebShell::LoadURL(const PRUnichar *aURLSpec,
* session History, it will be set to the cached history object by
* session History.
*/
if (aHistoryState)
SetHistoryState(aHistoryState);
SetHistoryState(aHistoryState);
/*
* Set mURL to spec so that session history can get
@ -2729,11 +2728,6 @@ nsWebShell::GetHistoryState(nsISupports** aLayoutHistoryState)
rv = docv->GetPresShell(*getter_AddRefs(shell));
if (NS_SUCCEEDED(rv)) {
rv = shell->GetHistoryState((nsILayoutHistoryState**) aLayoutHistoryState);
/* The following line was added by mistake in one of the previous checkins. It
* causes a leak of nsHistorylayoutState. But removing it causes a crash.
* Eric Pollmann(pollmann@netscape.com) is investigating it. Bug # 16496
*/
NS_ADDREF(*aLayoutHistoryState);
}
}
}