Bug 968804 - Part d: Add outer window assertions to SetInitialPrincipalToSubject; r=peterv

This commit is contained in:
Ms2ger 2014-05-20 21:50:58 +02:00
parent 4b4ff50cf7
commit a57f2d4cb0
3 changed files with 3 additions and 1 deletions

View File

@ -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<nsIPrincipal> newWindowPrincipal = nsContentUtils::SubjectPrincipal();

View File

@ -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;

View File

@ -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,