NS_PRECONDITION(aResult != nsnull, "null ptr"); if (! aResult) return NS_ERROR_NULL_POINTER;
InMemoryDataSource::GetAllResources(nsISimpleEnumerator** aResult){    NS_PRECONDITION(aResult != nsnull, "null ptr");    if (! aResult)        return NS_ERROR_NULL_POINTER;    nsresult rv;    nsCOMPtr<nsISupportsArray> values;    rv = NS_NewISupportsArray(getter_AddRefs(values));    if (NS_FAILED(rv)) return rv;    NS_AUTOLOCK(mLock);    // Enumerate all of our entries into an nsISupportsArray.    PL_HashTableEnumerateEntries(mForwardArcs, rdf_ResourceEnumerator, values.get());    *aResult = new nsArrayEnumerator(values);    if (! *aResult)        return NS_ERROR_OUT_OF_MEMORY;    NS_ADDREF(*aResult);    return NS_OK;}