Ooops, XULWindow doesn't implement nsIDocumentObserver. Commented it out for now and moved the removal of the observer back to webshellwindow. This should fix the mac build.

git-svn-id: svn://10.0.0.236/trunk@60144 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
tbogard%aol.net
2000-02-08 16:14:55 +00:00
parent 70bb9191f1
commit 287b76905f
2 changed files with 19 additions and 3 deletions

View File

@@ -372,7 +372,23 @@ nsresult nsWebShellWindow::Initialize(nsIWebShellWindow* aParent,
NS_METHOD
nsWebShellWindow::Close()
{
return nsXULWindow::Destroy();
#ifdef XP_MAC // Anyone still using native menus should add themselves here.
// unregister as document listener
// this is needed for menus
nsCOMPtr<nsIContentViewer> cv;
if(mDocShell)
mDocShell->GetContentViewer(getter_AddRefs(cv));
nsCOMPtr<nsIDocumentViewer> docv(do_QueryInterface(cv));
if(docv)
{
nsCOMPtr<nsIDocument> doc;
docv->GetDocument(*getter_AddRefs(doc));
if(doc)
doc->RemoveObserver(NS_STATIC_CAST(nsIDocumentObserver*, this));
}
#endif
return nsXULWindow::Destroy();
}