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
Родитель e3814a865f
Коммит 4f67ffa982
2 изменённых файлов: 19 добавлений и 3 удалений

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

@ -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();
}

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

@ -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