PL_DHashTableInit(&mResources, &gResourceTableOps, nsnull, sizeof(ResourceHashEntry), PL_DHASH_MIN_SIZE);  PL_DHashTableInit(&mLiterals, &gLiteralTableOps, nsnull, sizeof(LiteralHashEntry), PL_DHASH_MIN_SIZE);  PL_DHashTableInit(&mInts, &gIntTableOps, nsnull, sizeof(IntHashEntry), PL_DHASH_MIN_SIZE);  PL_DHashTableInit(&mDates, &gDateTableOps, nsnull, sizeof(DateHashEntry), PL_DHASH_MIN_SIZE);  PL_DHashTableInit(&mBlobs, &gBlobTableOps, nsnull, sizeof(BlobHashEntry), PL_DHASH_MIN_SIZE);
if (!PL_DHashTableInit(&mResources, &gResourceTableOps, nsnull, sizeof(ResourceHashEntry), PL_DHASH_MIN_SIZE)) { mResources.ops = nsnull; return NS_ERROR_OUT_OF_MEMORY; } if (!PL_DHashTableInit(&mLiterals, &gLiteralTableOps, nsnull, sizeof(LiteralHashEntry), PL_DHASH_MIN_SIZE)) { mLiterals.ops = nsnull; return NS_ERROR_OUT_OF_MEMORY; } if (!PL_DHashTableInit(&mInts, &gIntTableOps, nsnull, sizeof(IntHashEntry), PL_DHASH_MIN_SIZE)) { mInts.ops = nsnull; return NS_ERROR_OUT_OF_MEMORY; } if (!PL_DHashTableInit(&mDates, &gDateTableOps, nsnull, sizeof(DateHashEntry), PL_DHASH_MIN_SIZE)) { mDates.ops = nsnull; return NS_ERROR_OUT_OF_MEMORY; } if (!PL_DHashTableInit(&mBlobs, &gBlobTableOps, nsnull, sizeof(BlobHashEntry), PL_DHASH_MIN_SIZE)) { mBlobs.ops = nsnull; return NS_ERROR_OUT_OF_MEMORY; }
RDFServiceImpl::Init(){    nsresult rv;    mNamedDataSources = PL_NewHashTable(23,                                        PL_HashString,                                        PL_CompareStrings,                                        PL_CompareValues,                                        &dataSourceHashAllocOps, nsnull);    if (! mNamedDataSources)        return NS_ERROR_OUT_OF_MEMORY;    PL_DHashTableInit(&mResources, &gResourceTableOps, nsnull,                      sizeof(ResourceHashEntry), PL_DHASH_MIN_SIZE);    PL_DHashTableInit(&mLiterals, &gLiteralTableOps, nsnull,                      sizeof(LiteralHashEntry), PL_DHASH_MIN_SIZE);    PL_DHashTableInit(&mInts, &gIntTableOps, nsnull,                      sizeof(IntHashEntry), PL_DHASH_MIN_SIZE);    PL_DHashTableInit(&mDates, &gDateTableOps, nsnull,                      sizeof(DateHashEntry), PL_DHASH_MIN_SIZE);    PL_DHashTableInit(&mBlobs, &gBlobTableOps, nsnull,                      sizeof(BlobHashEntry), PL_DHASH_MIN_SIZE);    rv = nsComponentManager::FindFactory(kRDFDefaultResourceCID, getter_AddRefs(mDefaultResourceFactory));    NS_ASSERTION(NS_SUCCEEDED(rv), "unable to get default resource factory");    if (NS_FAILED(rv)) return rv;#ifdef PR_LOGGING    if (! gLog)        gLog = PR_NewLogModule("nsRDFService");#endif    return NS_OK;}