nsCOMPtr<nsIContent> templRoot = proto->GetImmediateChild(nsXBLAtoms::content);
nsIContent *templRoot = proto->GetImmediateChild(nsXBLAtoms::content);
PRBool PR_CALLBACK InstantiateInsertionPoint(nsHashKey* aKey, void* aData, void* aClosure){  nsXBLInsertionPointEntry* entry = NS_STATIC_CAST(nsXBLInsertionPointEntry*, aData);  InsertionData* data = NS_STATIC_CAST(InsertionData*, aClosure);  nsXBLBinding* binding = data->mBinding;  nsXBLPrototypeBinding* proto = data->mPrototype;  // Get the insertion parent.  nsIContent* content = entry->GetInsertionParent();  PRUint32 index = entry->GetInsertionIndex();  nsIContent* defContent = entry->GetDefaultContent();  // Locate the real content.  nsIContent *instanceRoot = binding->GetAnonymousContent();  nsCOMPtr<nsIContent> templRoot = proto->GetImmediateChild(nsXBLAtoms::content);  nsIContent *realContent = proto->LocateInstance(nsnull, templRoot,                                                  instanceRoot, content);  if (!realContent)    realContent = binding->GetBoundElement();  // Now that we have the real content, look it up in our table.  nsVoidArray* points;  binding->GetInsertionPointsFor(realContent, &points);  nsXBLInsertionPoint* insertionPoint = nsnull;  PRInt32 count = points->Count();  PRInt32 i = 0;  PRInt32 currIndex = 0;      for ( ; i < count; i++) {    nsXBLInsertionPoint* currPoint = NS_STATIC_CAST(nsXBLInsertionPoint*, points->ElementAt(i));    currIndex = currPoint->GetInsertionIndex();    if (currIndex == (PRInt32)index) {      // This is a match. Break out of the loop and set our variable.      insertionPoint = currPoint;      break;    }        if (currIndex > (PRInt32)index)      // There was no match. Break.      break;  }  if (!insertionPoint) {    // We need to make a new insertion point.    insertionPoint = new nsXBLInsertionPoint(realContent, index, defContent);    points->InsertElementAt(insertionPoint, i);  }  return PR_TRUE;}