if (!mParent || !mDocument) {
if (!mParent || !mDocument || aDocument == old_doc) {
nsHTMLIFrameElement::SetDocument(nsIDocument *aDocument, PRBool aDeep,                                 PRBool aCompileEventHandlers){  nsresult rv = nsGenericHTMLContainerElement::SetDocument(aDocument, aDeep,                                                           aCompileEventHandlers);  NS_ENSURE_SUCCESS(rv, rv);  // When document is being set to null on the element's destruction, do not  // call LoadSrc().  if (!mParent || !mDocument) {    return NS_OK;  }  return LoadSrc();}