clonedContent->ChildAt(k, *getter_AddRefs(cloneChild));
clonedContent->ChildAt(k, getter_AddRefs(cloneChild));
PRBool PR_CALLBACK RealizeDefaultContent(nsHashKey* aKey, void* aData, void* aClosure){  ContentListData* data = (ContentListData*)aClosure;  nsIBindingManager* bm = data->mBindingManager;  nsXBLBinding* binding = data->mBinding;  nsCOMPtr<nsIContent> boundElement;  binding->GetBoundElement(getter_AddRefs(boundElement));  nsVoidArray* arr = (nsVoidArray*)aData;  PRInt32 count = arr->Count();   for (PRInt32 i = 0; i < count; i++) {    nsXBLInsertionPoint* currPoint = NS_STATIC_CAST(nsXBLInsertionPoint*, arr->ElementAt(i));    PRInt32 insCount = currPoint->ChildCount();        if (insCount == 0) {      nsCOMPtr<nsIContent> defContent = currPoint->GetDefaultContentTemplate();      if (defContent) {        // We need to take this template and use it to realize the        // actual default content (through cloning).        // Clone this insertion point element.        nsCOMPtr<nsIDOMElement> elt(do_QueryInterface(defContent));        nsCOMPtr<nsIDOMNode> clonedNode;        elt->CloneNode(PR_TRUE, getter_AddRefs(clonedNode));        nsCOMPtr<nsIContent> insParent = currPoint->GetInsertionParent();        // Now that we have the cloned content, install the default content as        // if it were additional anonymous content.        nsCOMPtr<nsIContent> clonedContent(do_QueryInterface(clonedNode));        binding->InstallAnonymousContent(clonedContent, insParent);        // Cache the clone so that it can be properly destroyed if/when our        // other anonymous content is destroyed.        currPoint->SetDefaultContent(clonedContent);        // Now make sure the kids of the clone are added to the insertion point as        // children.        PRInt32 cloneKidCount;        clonedContent->ChildCount(cloneKidCount);        for (PRInt32 k = 0; k < cloneKidCount; k++) {          nsCOMPtr<nsIContent> cloneChild;          clonedContent->ChildAt(k, *getter_AddRefs(cloneChild));          bm->SetInsertionParent(cloneChild, insParent);          currPoint->AddChild(cloneChild);        }      }    }  }  return PR_TRUE;}