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.

This commit is contained in:
tbogard%aol.net 2000-02-08 16:14:55 +00:00
parent 4e6803a14f
commit 48b1db01ed
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();
}

View File

@ -288,8 +288,8 @@ NS_IMETHODIMP nsXULWindow::Destroy()
{
nsCOMPtr<nsIDocument> doc;
docv->GetDocument(*getter_AddRefs(doc));
if(doc)
doc->RemoveObserver(NS_STATIC_CAST(nsIDocumentObserver*, this));
/* if(doc)
doc->RemoveObserver(NS_STATIC_CAST(nsIDocumentObserver*, this)); */
}
#endif