if (NS_SUCCEEDED(aParentContent->ChildAt(inx, *getter_AddRefs(child))) && child) {
if (NS_SUCCEEDED(aParentContent->ChildAt(inx, getter_AddRefs(child))) && child) {
DocumentViewerImpl::FindFrameSetWithIID(nsIContent * aParentContent,                                        const nsIID& aIID){  PRInt32 numChildren;  aParentContent->ChildCount(numChildren);  // do a breadth search across all siblings  PRInt32 inx;  for (inx = 0; inx < numChildren; ++inx) {    nsCOMPtr<nsIContent> child;    if (NS_SUCCEEDED(aParentContent->ChildAt(inx, *getter_AddRefs(child))) && child) {      nsCOMPtr<nsISupports> temp;      if (NS_SUCCEEDED(child->QueryInterface(aIID, (void**)getter_AddRefs(temp)))) {        return NS_OK;      }    }  }  return NS_ERROR_FAILURE;}