fixing crashing popups on Windows. Smoketest blocker. Simple null check, nsPIDOMWindow QI result wasn't checked. Not sure why this fails suddenly, I would think everyone shoudl be implementing nsPIDOMWindow.... r=pinkerton

This commit is contained in:
saari%netscape.com 2000-07-07 22:17:00 +00:00
Родитель 84dfd2d63a
Коммит 13d87ad82a
2 изменённых файлов: 8 добавлений и 6 удалений

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

@ -2318,9 +2318,10 @@ nsEventStateManager::SendFocusBlur(nsIPresContext* aPresContext, nsIContent *aCo
mDocument->GetScriptGlobalObject(getter_AddRefs(newGlobal));
nsCOMPtr<nsPIDOMWindow> newWindow = do_QueryInterface(newGlobal);
nsCOMPtr<nsPIDOMWindow> oldWindow = do_QueryInterface(oldGlobal);
newWindow->GetRootCommandDispatcher(mDocument, getter_AddRefs(newCommandDispatcher));
oldWindow->GetRootCommandDispatcher(gLastFocusedDocument, getter_AddRefs(oldCommandDispatcher));
if(newWindow)
newWindow->GetRootCommandDispatcher(mDocument, getter_AddRefs(newCommandDispatcher));
if(oldWindow)
oldWindow->GetRootCommandDispatcher(gLastFocusedDocument, getter_AddRefs(oldCommandDispatcher));
if(oldCommandDispatcher && oldCommandDispatcher != newCommandDispatcher)
oldCommandDispatcher->SetSuppressFocus(PR_TRUE);
}

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

@ -2318,9 +2318,10 @@ nsEventStateManager::SendFocusBlur(nsIPresContext* aPresContext, nsIContent *aCo
mDocument->GetScriptGlobalObject(getter_AddRefs(newGlobal));
nsCOMPtr<nsPIDOMWindow> newWindow = do_QueryInterface(newGlobal);
nsCOMPtr<nsPIDOMWindow> oldWindow = do_QueryInterface(oldGlobal);
newWindow->GetRootCommandDispatcher(mDocument, getter_AddRefs(newCommandDispatcher));
oldWindow->GetRootCommandDispatcher(gLastFocusedDocument, getter_AddRefs(oldCommandDispatcher));
if(newWindow)
newWindow->GetRootCommandDispatcher(mDocument, getter_AddRefs(newCommandDispatcher));
if(oldWindow)
oldWindow->GetRootCommandDispatcher(gLastFocusedDocument, getter_AddRefs(oldCommandDispatcher));
if(oldCommandDispatcher && oldCommandDispatcher != newCommandDispatcher)
oldCommandDispatcher->SetSuppressFocus(PR_TRUE);
}