if (!content) {    return NS_OK; }  if (!mFrameLoader) { nsCOMPtr<nsIFrameLoaderOwner> frame_loader_owner = do_QueryInterface(content);  if (frame_loader_owner) { frame_loader_owner->GetFrameLoader(getter_AddRefs(mFrameLoader)); }  if (!mFrameLoader) { nsresult rv = NS_OK;   mFrameLoader = do_CreateInstance(NS_FRAMELOADER_CONTRACTID, &rv); NS_ENSURE_SUCCESS(rv, rv);   mOwnsFrameLoader = PR_TRUE;   mFrameLoader->Init(content);   rv = mFrameLoader->LoadFrame(); NS_ENSURE_SUCCESS(rv, rv); } }  return mFrameLoader->GetDocShell(aDocShell);
return firstChild->GetDocShell(aDocShell);
nsHTMLFrameInnerFrame::GetDocShell(nsIDocShell **aDocShell){  *aDocShell = nsnull;  nsCOMPtr<nsIContent> content;  GetParentContent(getter_AddRefs(content));  if (!content) {    // Hmm, no content in this frame (or in the parent, really),    // that's odd, not much to be done here then.    return NS_OK;  }  if (!mFrameLoader) {    nsCOMPtr<nsIFrameLoaderOwner> frame_loader_owner =      do_QueryInterface(content);    if (frame_loader_owner) {      frame_loader_owner->GetFrameLoader(getter_AddRefs(mFrameLoader));    }    if (!mFrameLoader) {      nsresult rv = NS_OK;      // No frame loader available from the content, create our own...      mFrameLoader = do_CreateInstance(NS_FRAMELOADER_CONTRACTID, &rv);      NS_ENSURE_SUCCESS(rv, rv);      // ... remember that we own this frame loader...      mOwnsFrameLoader = PR_TRUE;      // ... initialize it...      mFrameLoader->Init(content);      // ... and tell it to start loading.      rv = mFrameLoader->LoadFrame();      NS_ENSURE_SUCCESS(rv, rv);    }  }  return mFrameLoader->GetDocShell(aDocShell);}