From c8338b2791099184e14c418750fc1be532b1ec18 Mon Sep 17 00:00:00 2001 From: "danm%netscape.com" Date: Thu, 3 Jul 2003 21:13:01 +0000 Subject: [PATCH] active window must be a top-level docshell. bug 170693. r=blizzard,bryner --- .../components/windowwatcher/src/nsWindowWatcher.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/embedding/components/windowwatcher/src/nsWindowWatcher.cpp b/embedding/components/windowwatcher/src/nsWindowWatcher.cpp index ad930cfc899..17b47256a44 100644 --- a/embedding/components/windowwatcher/src/nsWindowWatcher.cpp +++ b/embedding/components/windowwatcher/src/nsWindowWatcher.cpp @@ -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