ChildIterator(nsIContent* aContent, nsIDocument* aDocument) :mContent(aContent), mIndex(0), mLength(0), mNodes(nsnull) { NS_PRECONDITION(aContent != nsnull, "no content"); NS_PRECONDITION(aDocument != nsnull, "no document");  aDocument->GetBindingManager(getter_AddRefs(mBindingManager));  #ifdef DEBUG   nsCOMPtr<nsIDocument> doc; mContent->GetDocument(*getter_AddRefs(doc)); NS_ASSERTION(doc.get() == aDocument, "content doc != frame ctor doc"); #endif   mBindingManager->GetXBLChildNodesFor(mContent, getter_AddRefs(mNodes)); if (mNodes) mNodes->GetLength(&mLength); else { PRInt32 l; mContent->ChildCount(l); mLength = l; } }
ChildIterator() : mIndex(0) {}
  ChildIterator(nsIContent* aContent, nsIDocument* aDocument)    :mContent(aContent), mIndex(0), mLength(0), mNodes(nsnull)  {    NS_PRECONDITION(aContent != nsnull, "no content");    NS_PRECONDITION(aDocument != nsnull, "no document");    aDocument->GetBindingManager(getter_AddRefs(mBindingManager));#ifdef DEBUG    // Verify that the frame ctor's document is the same as the    // content element's document.    nsCOMPtr<nsIDocument> doc;    mContent->GetDocument(*getter_AddRefs(doc));    NS_ASSERTION(doc.get() == aDocument, "content doc != frame ctor doc");#endif    // Retrieve the anonymous content that we should build.    mBindingManager->GetXBLChildNodesFor(mContent, getter_AddRefs(mNodes));    if (mNodes)      mNodes->GetLength(&mLength);    else {      PRInt32 l;      mContent->ChildCount(l);      mLength = l;    }  }