mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-12 21:05:36 +00:00
Write ArcLabelsIn so it doesn't crash.
This commit is contained in:
parent
0708ffd2ac
commit
7f795cdaad
@ -349,8 +349,7 @@ NS_IMETHODIMP nsMsgFolderDataSource::HasAssertion(nsIRDFResource* source,
|
||||
NS_IMETHODIMP nsMsgFolderDataSource::ArcLabelsIn(nsIRDFNode* node,
|
||||
nsISimpleEnumerator** labels)
|
||||
{
|
||||
PR_ASSERT(0);
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
return nsMsgRDFDataSource::ArcLabelsIn(node, labels);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsMsgFolderDataSource::ArcLabelsOut(nsIRDFResource* source,
|
||||
|
@ -297,8 +297,7 @@ NS_IMETHODIMP nsMsgMessageDataSource::HasAssertion(nsIRDFResource* source,
|
||||
NS_IMETHODIMP nsMsgMessageDataSource::ArcLabelsIn(nsIRDFNode* node,
|
||||
nsISimpleEnumerator** labels)
|
||||
{
|
||||
PR_ASSERT(0);
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
return nsMsgRDFDataSource::ArcLabelsIn(node, labels);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsMsgMessageDataSource::ArcLabelsOut(nsIRDFResource* source,
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include "plstr.h"
|
||||
#include "nsXPIDLString.h"
|
||||
#include "nsMsgRDFUtils.h"
|
||||
#include "nsEnumeratorUtils.h"
|
||||
|
||||
static NS_DEFINE_CID(kRDFServiceCID, NS_RDFSERVICE_CID);
|
||||
|
||||
@ -197,7 +198,23 @@ nsMsgRDFDataSource::RemoveObserver(nsIRDFObserver *aObserver)
|
||||
NS_IMETHODIMP
|
||||
nsMsgRDFDataSource::ArcLabelsIn(nsIRDFNode *aNode, nsISimpleEnumerator **_retval)
|
||||
{
|
||||
return NS_RDF_NO_VALUE;
|
||||
//return empty enumerator
|
||||
nsCOMPtr<nsISupportsArray> arcs;
|
||||
|
||||
nsresult rv = NS_NewISupportsArray(getter_AddRefs(arcs));
|
||||
if(NS_FAILED(rv))
|
||||
return rv;
|
||||
|
||||
nsArrayEnumerator* arrayEnumerator =
|
||||
new nsArrayEnumerator(arcs);
|
||||
|
||||
if (arrayEnumerator == nsnull)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
NS_ADDREF(arrayEnumerator);
|
||||
*_retval = arrayEnumerator;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user