Bug 1301488 - Remove an unneeded null check from nsWebShellWindow::Initialize; r=bzbarsky

mDocShell is being checked before this part in the same function.
This commit is contained in:
Ehsan Akhgari 2016-09-08 14:33:22 -04:00
parent 4a5470e722
commit 8ca93a6416

View File

@ -224,7 +224,7 @@ nsresult nsWebShellWindow::Initialize(nsIXULWindow* aParent,
}
rv = mDocShell->CreateAboutBlankContentViewer(principal);
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIDocument> doc = mDocShell ? mDocShell->GetDocument() : nullptr;
nsCOMPtr<nsIDocument> doc = mDocShell->GetDocument();
NS_ENSURE_TRUE(!!doc, NS_ERROR_FAILURE);
doc->SetIsInitialDocument(true);
}