Fix for bug 110729. Prevent mail display pane to open a pluging in full page mode. Fix also an uninitialized pointer. Patch provided by av. R=ducarroz, SR=beard

This commit is contained in:
ducarroz@netscape.com
2002-11-19 15:30:03 +00:00
parent 4799790fd9
commit d0aa000559
2 changed files with 10 additions and 5 deletions

View File

@@ -4497,12 +4497,18 @@ nsDocShell::NewContentViewerObj(const char *aContentType,
aViewer),
NS_ERROR_FAILURE);
(*aViewer)->SetContainer(NS_STATIC_CAST(nsIContentViewerContainer *, this));
nsCOMPtr<nsIPluginViewer> pv(do_QueryInterface(*aViewer));
if (pv)
SetTitle(nsnull); // clear title bar for full-page plugin
if (pv) {
if (mName.EqualsIgnoreCase("messagepane")) {
NS_IF_RELEASE(*aViewer);
NS_IF_RELEASE(*aContentHandler);
return NS_ERROR_FAILURE;
}
else
SetTitle(nsnull); // clear title bar for full-page plugin
}
(*aViewer)->SetContainer(NS_STATIC_CAST(nsIContentViewerContainer *, this));
return NS_OK;
}