PL_HashTableRemove(mResources, uri);
PLHashEntry** hep = PL_HashTableRawLookup(mResources, (*mResources->keyHash)(uri), uri); NS_ASSERTION(*hep != nsnull, "resource wasn't registered"); if (! *hep) return NS_ERROR_FAILURE;
ServiceImpl::UnregisterResource(nsIRDFResource* resource){    NS_PRECONDITION(resource != nsnull, "null ptr");    if (! resource)        return NS_ERROR_NULL_POINTER;    nsresult rv;    nsXPIDLCString uri;    rv = resource->GetValue(getter_Copies(uri));    if (NS_FAILED(rv)) return rv;    PL_HashTableRemove(mResources, uri);    // XXXwaterson: LEAK! Release the previous key.    // N.B. that we _don't_ release the resource: we only held a weak    // reference to it in the hashtable.    return NS_OK;}