active window must be a top-level docshell. bug 170693. r=blizzard,bryner

This commit is contained in:
danm%netscape.com 2003-07-03 21:13:01 +00:00
Родитель b02823c542
Коммит c8338b2791
1 изменённых файлов: 6 добавлений и 2 удалений

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

@ -885,8 +885,12 @@ nsWindowWatcher::GetActiveWindow(nsIDOMWindow **aActiveWindow)
NS_IMETHODIMP
nsWindowWatcher::SetActiveWindow(nsIDOMWindow *aActiveWindow)
{
mActiveWindow = aActiveWindow;
return NS_OK;
if (FindWindowEntry(aActiveWindow)) {
mActiveWindow = aActiveWindow;
return NS_OK;
}
NS_ERROR("invalid active window");
return NS_ERROR_FAILURE;
}
NS_IMETHODIMP