mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-14 02:31:59 +00:00
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:
parent
4e6803a14f
commit
48b1db01ed
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user