Bug 750820 - make oldFocusedContent an nsCOMPtr in nsGlobalWindow::PageHidden. r=bz

This commit is contained in:
Andrew McCreight 2012-05-18 15:19:34 -07:00
parent 1bf90577d2
commit 6cc6d55a6b

View File

@ -927,8 +927,7 @@ nsFocusManager::WindowHidden(nsIDOMWindow* aWindow)
// window, or an ancestor of the focused window. Either way, the focus is no
// longer valid, so it needs to be updated.
nsIContent* oldFocusedContent = mFocusedContent;
mFocusedContent = nsnull;
nsCOMPtr<nsIContent> oldFocusedContent = mFocusedContent.forget();
if (oldFocusedContent && oldFocusedContent->IsInDoc()) {
NotifyFocusStateChange(oldFocusedContent,