Bug 774633 - Remove dead mOpenerScriptPrincipal. r=jst

This value is initialized to null and never set, so we can get rid of it.
This commit is contained in:
Bobby Holley
2012-08-23 16:44:52 -07:00
parent 76f3e79815
commit 16ca2e4d85
4 changed files with 10 additions and 36 deletions

View File

@@ -6665,26 +6665,17 @@ nsDocShell::EnsureContentViewer()
NS_TIME_FUNCTION;
nsIPrincipal* principal = nullptr;
nsCOMPtr<nsIURI> baseURI;
nsCOMPtr<nsPIDOMWindow> piDOMWindow(do_QueryInterface(mScriptGlobal));
if (piDOMWindow) {
principal = piDOMWindow->GetOpenerScriptPrincipal();
}
if (!principal) {
principal = GetInheritedPrincipal(false);
nsCOMPtr<nsIDocShellTreeItem> parentItem;
GetSameTypeParent(getter_AddRefs(parentItem));
if (parentItem) {
nsCOMPtr<nsPIDOMWindow> domWin = do_GetInterface(GetAsSupports(this));
if (domWin) {
nsCOMPtr<nsIContent> parentContent =
do_QueryInterface(domWin->GetFrameElementInternal());
if (parentContent) {
baseURI = parentContent->GetBaseURI();
}
nsIPrincipal* principal = GetInheritedPrincipal(false);
nsCOMPtr<nsIDocShellTreeItem> parentItem;
GetSameTypeParent(getter_AddRefs(parentItem));
if (parentItem) {
nsCOMPtr<nsPIDOMWindow> domWin = do_GetInterface(GetAsSupports(this));
if (domWin) {
nsCOMPtr<nsIContent> parentContent =
do_QueryInterface(domWin->GetFrameElementInternal());
if (parentContent) {
baseURI = parentContent->GetBaseURI();
}
}
}