Bug 663035. Retrieving docShell of remote frames should simply return null instead of throwing. r=bsmedberg

This commit is contained in:
Felipe Gomes 2011-06-14 17:29:10 -07:00
Родитель d045014db8
Коммит 9341e750fe
1 изменённых файлов: 3 добавлений и 2 удалений

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

@ -537,6 +537,7 @@ NS_IMETHODIMP
nsFrameLoader::GetDocShell(nsIDocShell **aDocShell)
{
*aDocShell = nsnull;
nsresult rv = NS_OK;
// If we have an owner, make sure we have a docshell and return
// that. If not, we're most likely in the middle of being torn down,
@ -547,7 +548,7 @@ nsFrameLoader::GetDocShell(nsIDocShell **aDocShell)
return rv;
if (mRemoteFrame) {
NS_WARNING("No docshells for remote frames!");
return NS_ERROR_NOT_AVAILABLE;
return rv;
}
NS_ASSERTION(mDocShell,
"MaybeCreateDocShell succeeded, but null mDocShell");
@ -556,7 +557,7 @@ nsFrameLoader::GetDocShell(nsIDocShell **aDocShell)
*aDocShell = mDocShell;
NS_IF_ADDREF(*aDocShell);
return NS_OK;
return rv;
}
void