PL_HashTableRemove(mMap, aElement);  PRInt32 count;     nsCOMPtr<nsIXULContent> xulcontent = do_QueryInterface(aElement); if (xulcontent) { xulcontent->PeekChildCount(count); } else { aElement->ChildCount(count); }  for (PRInt32 i = 0; i < count; ++i) { nsCOMPtr<nsIContent> child; aElement->ChildAt(i, *getter_AddRefs(child));  Remove(child); }  return NS_OK;
Iterator doomed = Find(*aMatch); if (doomed != Last()) Erase(doomed);
ContentSupportMap::Remove(nsIContent* aElement){    PL_HashTableRemove(mMap, aElement);    PRInt32 count;    // If possible, use the special nsIXULContent interface to "peek"    // at the child count without accidentally creating children as a    // side effect, since we're about to rip 'em outta the map anyway.    nsCOMPtr<nsIXULContent> xulcontent = do_QueryInterface(aElement);    if (xulcontent) {        xulcontent->PeekChildCount(count);    }    else {        aElement->ChildCount(count);    }    for (PRInt32 i = 0; i < count; ++i) {        nsCOMPtr<nsIContent> child;        aElement->ChildAt(i, *getter_AddRefs(child));        Remove(child);    }    return NS_OK;}