Skip to content

Commit

Permalink
Bug 679626 crash in nsIDOMWindowInternal::GetDocShell with signature …
Browse files Browse the repository at this point in the history
…pointing to nsASDOMWindowEnumerator::GetNext - try to avoid windows with no docshells. r=bz
  • Loading branch information
David Bienvenu committed Oct 2, 2012
1 parent 1740ce1 commit 6336771
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions xpfe/appshell/src/nsAppShellWindowEnumerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,11 +222,12 @@ NS_IMETHODIMP nsASDOMWindowEnumerator::GetNext(nsISupports **retval)
return NS_ERROR_INVALID_ARG;

*retval = nullptr;
if (mCurrentPosition) {
while (mCurrentPosition) {
nsCOMPtr<nsIDOMWindow> domWindow;
GetDOMWindow(mCurrentPosition->mWindow, domWindow);
CallQueryInterface(domWindow, retval);
mCurrentPosition = FindNext();
if (domWindow)
return CallQueryInterface(domWindow, retval);
}
return NS_OK;
}
Expand Down

0 comments on commit 6336771

Please sign in to comment.