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 ce7b521097
commit 072a74616f

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,