diff --git a/dom/base/nsGlobalWindow.cpp b/dom/base/nsGlobalWindow.cpp index fe286d0b5a4..f06340bf534 100644 --- a/dom/base/nsGlobalWindow.cpp +++ b/dom/base/nsGlobalWindow.cpp @@ -2031,7 +2031,7 @@ nsGlobalWindow::WouldReuseInnerWindow(nsIDocument* aNewDocument) void nsGlobalWindow::SetInitialPrincipalToSubject() { - FORWARD_TO_OUTER_VOID(SetInitialPrincipalToSubject, ()); + MOZ_ASSERT(IsOuterWindow()); // First, grab the subject principal. nsCOMPtr newWindowPrincipal = nsContentUtils::SubjectPrincipal(); diff --git a/dom/base/nsGlobalWindow.h b/dom/base/nsGlobalWindow.h index 8299d17c383..802ae5169e9 100644 --- a/dom/base/nsGlobalWindow.h +++ b/dom/base/nsGlobalWindow.h @@ -434,6 +434,7 @@ public: virtual NS_HIDDEN_(void) SetIsBackground(bool aIsBackground); virtual NS_HIDDEN_(void) SetChromeEventHandler(mozilla::dom::EventTarget* aChromeEventHandler); + // Outer windows only. virtual NS_HIDDEN_(void) SetInitialPrincipalToSubject(); virtual NS_HIDDEN_(PopupControlState) PushPopupControlState(PopupControlState state, bool aForce) const; diff --git a/dom/base/nsPIDOMWindow.h b/dom/base/nsPIDOMWindow.h index 408275bbd1c..99b44e0e379 100644 --- a/dom/base/nsPIDOMWindow.h +++ b/dom/base/nsPIDOMWindow.h @@ -278,6 +278,7 @@ public: // Set the window up with an about:blank document with the current subject // principal. + // Outer windows only. virtual void SetInitialPrincipalToSubject() = 0; virtual PopupControlState PushPopupControlState(PopupControlState aState,