Skip to content

Commit

Permalink
Bug 1245306: Devirtualize RefreshCompartmentPrincipal. r=smaug
Browse files Browse the repository at this point in the history
  • Loading branch information
khuey committed Feb 3, 2016
1 parent 369abbd commit e1d9c64
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 10 deletions.
2 changes: 1 addition & 1 deletion dom/base/nsDocument.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2272,7 +2272,7 @@ nsDocument::ResetToURI(nsIURI *aURI, nsILoadGroup *aLoadGroup,

// Refresh the principal on the compartment.
if (nsPIDOMWindowInner* win = GetInnerWindow()) {
win->RefreshCompartmentPrincipal();
nsGlobalWindow::Cast(win)->RefreshCompartmentPrincipal();
}
}

Expand Down
2 changes: 1 addition & 1 deletion dom/base/nsGlobalWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ class nsGlobalWindow : public mozilla::dom::EventTarget,
bool DispatchResizeEvent(const mozilla::CSSIntSize& aSize);

// Inner windows only.
virtual void RefreshCompartmentPrincipal() override;
void RefreshCompartmentPrincipal();

// For accessing protected field mFullScreen
friend class FullscreenTransitionTask;
Expand Down
8 changes: 0 additions & 8 deletions dom/base/nsPIDOMWindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -507,14 +507,6 @@ class nsPIDOMWindow : public T
*/
virtual bool DispatchCustomEvent(const nsAString& aEventName) = 0;

/**
* Call when the document principal may have changed and the compartment
* principal needs to be updated.
*
* Inner windows only.
*/
virtual void RefreshCompartmentPrincipal() = 0;

/**
* Like nsIDOMWindow::Open, except that we don't navigate to the given URL.
*
Expand Down

0 comments on commit e1d9c64

Please sign in to comment.