bug 1271436 - use nsIDocShellTreeItem::GetWindow() more r=smaug

This commit is contained in:
Trevor Saunders
2016-04-12 02:37:05 -04:00
parent 1c9ecfc253
commit 3544821c3d
3 changed files with 11 additions and 4 deletions

View File

@@ -123,8 +123,11 @@ nsGenericHTMLFrameElement::GetContentWindow()
nsCOMPtr<nsIDocShell> doc_shell;
mFrameLoader->GetDocShell(getter_AddRefs(doc_shell));
if (!doc_shell) {
return nullptr;
}
nsCOMPtr<nsPIDOMWindowOuter> win = do_GetInterface(doc_shell);
nsCOMPtr<nsPIDOMWindowOuter> win = doc_shell->GetWindow();
if (!win) {
return nullptr;