ContentListItem* head = (ContentListItem*) PL_HashTableLookup(mResources, aResource);
const nsPromiseFlatString& flatID = PromiseFlatString(aID); const PRUnichar *id = flatID.get();
nsElementMap::Remove(nsIRDFResource* aResource, nsIContent* aContent){    NS_PRECONDITION(mResources != nsnull, "not initialized");    if (! mResources)        return NS_ERROR_NOT_INITIALIZED;    ContentListItem* head =        (ContentListItem*) PL_HashTableLookup(mResources, aResource);    if (head) {        if (head->mContent == aContent) {            NS_RELEASE(aContent);            ContentListItem* newHead = head->mNext;            if (newHead) {                PL_HashTableAdd(mResources, aResource, newHead);            }            else {                // It was the last reference in the table                PL_HashTableRemove(mResources, aResource);                NS_RELEASE(aResource);            }            delete head;            return NS_OK;        }        else {            ContentListItem* doomed = head->mNext;            while (doomed) {                if (doomed->mContent == aContent) {                    head->mNext = doomed->mNext;                    NS_RELEASE(aContent);                    delete doomed;                    return NS_OK;                }                head = doomed;                doomed = doomed->mNext;            }        }    }    // XXX Don't comment out this assert: if you get here,    // something has gone dreadfully, horribly    // wrong. Curse. Scream. File a bug against    // waterson@netscape.com.    NS_ERROR("attempt to remove an element that was never added");    return NS_ERROR_ILLEGAL_VALUE;}