зеркало из https://github.com/mozilla/pjs.git
Protect against a null docshell being passed in to GetIndexOfDocShell (bug 264032). r=mconnor.
This commit is contained in:
Родитель
8bb695bed4
Коммит
b3acbbd54e
|
@ -1066,6 +1066,9 @@ nsFormFillController::GetWindowForDocShell(nsIDocShell *aDocShell)
|
|||
PRInt32
|
||||
nsFormFillController::GetIndexOfDocShell(nsIDocShell *aDocShell)
|
||||
{
|
||||
if (!aDocShell)
|
||||
return -1;
|
||||
|
||||
// Loop through our cached docShells looking for the given docShell
|
||||
PRUint32 count;
|
||||
mDocShells->Count(&count);
|
||||
|
@ -1087,4 +1090,3 @@ nsFormFillController::GetIndexOfDocShell(nsIDocShell *aDocShell)
|
|||
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче