if (mInsertionPointTable) { nsCOMPtr<nsIAtom> tag; aChild->GetTag(*getter_AddRefs(tag)); nsISupportsKey key(tag); nsCOMPtr<nsIContent> content = getter_AddRefs(NS_STATIC_CAST(nsIContent*, mInsertionPointTable->Get(&key))); if (!content) { nsISupportsKey key2(kChildrenAtom); content = getter_AddRefs(NS_STATIC_CAST(nsIContent*, mInsertionPointTable->Get(&key2))); }  *aResult = content; NS_IF_ADDREF(*aResult); } return NS_OK;
*aDefaultContent = nsnull; if (mContent) return mPrototypeBinding->GetInsertionPoint(mBoundElement, mContent, aChild, aResult, aIndex, aDefaultContent); else if (mNextBinding) return mNextBinding->GetInsertionPoint(aChild, aResult, aIndex, aDefaultContent); return NS_OK;
nsXBLBinding::GetInsertionPoint(nsIContent* aChild, nsIContent** aResult){  *aResult = nsnull;  if (mInsertionPointTable) {    nsCOMPtr<nsIAtom> tag;    aChild->GetTag(*getter_AddRefs(tag));    nsISupportsKey key(tag);    nsCOMPtr<nsIContent> content = getter_AddRefs(NS_STATIC_CAST(nsIContent*,                                                                  mInsertionPointTable->Get(&key)));    if (!content) {      nsISupportsKey key2(kChildrenAtom);      content = getter_AddRefs(NS_STATIC_CAST(nsIContent*, mInsertionPointTable->Get(&key2)));    }    *aResult = content;    NS_IF_ADDREF(*aResult);  }  return NS_OK;  }