addref return ptr in GetContentDocShell -- the real reason for bug 47491

This commit is contained in:
danm%netscape.com 2000-08-07 02:58:10 +00:00
Родитель 961e14f102
Коммит 879c25a8fb
1 изменённых файлов: 4 добавлений и 3 удалений

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

@ -1056,10 +1056,11 @@ nsBrowserInstance::SetContentWindow(nsIDOMWindow* aWin)
NS_IMETHODIMP
nsBrowserInstance::GetContentDocShell(nsIDocShell** aDocShell)
{
NS_ENSURE_ARG_POINTER(aDocShell);
NS_ENSURE_ARG_POINTER(aDocShell);
*aDocShell = GetContentAreaDocShell();
return NS_OK;
*aDocShell = GetContentAreaDocShell();
NS_IF_ADDREF(*aDocShell); // (GetContentAreaDocShell doesn't)
return NS_OK;
}