nsCOMPtr<nsIRDFResource> folderResource;
nsMessenger::EmptyTrash(nsIRDFCompositeDataSource* db,                        nsIDOMXULElement* folder){  nsresult rv = NS_ERROR_NULL_POINTER;    if (!db || !folder) return rv;  nsCOMPtr<nsISupportsArray> folderArray;  nsCOMPtr<nsIRDFResource> folderResource;  rv = folder->GetResource(getter_AddRefs(folderResource));  if (NS_SUCCEEDED(rv))  {    rv = NS_NewISupportsArray(getter_AddRefs(folderArray));    if (NS_FAILED(rv)) return rv;    folderArray->AppendElement(folderResource);    rv = DoCommand(db, NC_RDF_EMPTYTRASH, folderArray, nsnull);  }  return rv;}