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
Родитель e5c254ed1e
Коммит 64edc63a64
1 изменённых файлов: 1 добавлений и 2 удалений

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

@ -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,