CHecking in fix for 59130, crash clicking links, patch from dbaron@fas.harvard.edu, r=ben@netscape.com,

a=hyatt@netscape.com.
This commit is contained in:
ben%netscape.com 2000-11-05 03:53:55 +00:00
Родитель 271ea1c3df
Коммит d0b89dae82
1 изменённых файлов: 8 добавлений и 6 удалений

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

@ -120,13 +120,15 @@ nsFocusController::UpdateCommands(const nsAReadableString& aEventName)
else if (mCurrentElement) {
nsCOMPtr<nsIDOMDocument> domDoc;
mCurrentElement->GetOwnerDocument(getter_AddRefs(domDoc));
nsCOMPtr<nsIDocument> doc(do_QueryInterface(domDoc));
if (domDoc) {
nsCOMPtr<nsIDocument> doc(do_QueryInterface(domDoc));
nsCOMPtr<nsIScriptGlobalObject> global;
doc->GetScriptGlobalObject(getter_AddRefs(global));
nsCOMPtr<nsIScriptGlobalObject> global;
doc->GetScriptGlobalObject(getter_AddRefs(global));
nsCOMPtr<nsIDOMWindowInternal> window(do_QueryInterface(global));
window->UpdateCommands(aEventName);
nsCOMPtr<nsIDOMWindowInternal> window(do_QueryInterface(global));
window->UpdateCommands(aEventName);
}
}
return NS_OK;
}