nsCOMPtr<nsIDocument> sub_doc; mDocument->GetSubDocumentFor(this, getter_AddRefs(sub_doc));
nsIDocument *sub_doc = mDocument->GetSubDocumentFor(this);
nsHTMLObjectElement::GetContentDocument(nsIDOMDocument** aContentDocument){  NS_ENSURE_ARG_POINTER(aContentDocument);  *aContentDocument = nsnull;  if (!mDocument) {    return NS_OK;  }  nsCOMPtr<nsIDocument> sub_doc;  mDocument->GetSubDocumentFor(this, getter_AddRefs(sub_doc));  if (!sub_doc) {    return NS_OK;  }  return CallQueryInterface(sub_doc, aContentDocument);}