quiet down RDF by handling datasources without windows gracefully (needed for search, so I could reuse the threadpane without causing assertions)

r=sspitzer
for #33101
This commit is contained in:
alecf%netscape.com 2000-06-18 05:43:32 +00:00
parent 13723c1641
commit 1ecfb815c9

View File

@ -496,9 +496,9 @@ NS_IMETHODIMP nsMsgMessageDataSource::ArcLabelsOut(nsIRDFResource* source,
PRBool showThreads;
rv = GetIsThreaded(&showThreads);
if(NS_FAILED(rv)) return rv;
if(showThreads)
// handle this failure gracefully - not all datasources have views.
if(NS_SUCCEEDED(rv) && showThreads)
{
arcsArray = kThreadsArcsOutArray;
}
@ -513,7 +513,7 @@ NS_IMETHODIMP nsMsgMessageDataSource::ArcLabelsOut(nsIRDFResource* source,
}
rv = NS_NewArrayEnumerator(labels, arcsArray);
if(NS_FAILED(rv)) return rv;
NS_ENSURE_SUCCESS(rv, rv);
return NS_OK;
}