Bug 1507604 - Remove nsPIDOMWindowInner::SetOpenerWindow. r=smaug
authorPeter Van der Beken <peterv@propagandism.org>
Fri, 23 Nov 2018 15:17:01 +0000
changeset 504291 8c69ece51451f6ae6da33d9475f7225a51b037d3
parent 504290 9ef539ed2f409a3844cbbadc681ea209af44bca5
child 504292 61ae20a33f32512939c5239d16fbfca11969ddc7
push id10290
push userffxbld-merge
push dateMon, 03 Dec 2018 16:23:23 +0000
treeherdermozilla-beta@700bed2445e6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1507604
milestone65.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1507604 - Remove nsPIDOMWindowInner::SetOpenerWindow. r=smaug Differential Revision: https://phabricator.services.mozilla.com/D12134
dom/base/nsGlobalWindowInner.cpp
dom/base/nsGlobalWindowInner.h
dom/base/nsPIDOMWindow.h
--- a/dom/base/nsGlobalWindowInner.cpp
+++ b/dom/base/nsGlobalWindowInner.cpp
@@ -1929,23 +1929,16 @@ nsGlobalWindowInner::ExecutionReady()
 
   rv = mClientSource->WindowExecutionReady(AsInner());
   NS_ENSURE_SUCCESS(rv, rv);
 
   return NS_OK;
 }
 
 void
-nsGlobalWindowInner::SetOpenerWindow(nsPIDOMWindowOuter* aOpener,
-                                     bool aOriginalOpener)
-{
-  FORWARD_TO_OUTER_VOID(SetOpenerWindow, (aOpener, aOriginalOpener));
-}
-
-void
 nsGlobalWindowInner::UpdateParentTarget()
 {
   // NOTE: This method is identical to
   // nsGlobalWindowOuter::UpdateParentTarget(). IF YOU UPDATE THIS METHOD,
   // UPDATE THE OTHER ONE TOO!
 
   // Try to get our frame element's tab child global (its in-process message
   // manager).  If that fails, fall back to the chrome event handler's tab
@@ -3256,17 +3249,17 @@ nsGlobalWindowInner::GetOpener(JSContext
   aError = nsContentUtils::WrapNative(aCx, opener, aRetval);
 }
 
 void
 nsGlobalWindowInner::SetOpener(JSContext* aCx, JS::Handle<JS::Value> aOpener,
                                ErrorResult& aError)
 {
   if (aOpener.isNull()) {
-    SetOpenerWindow(nullptr, false);
+    FORWARD_TO_OUTER_VOID(SetOpenerWindow, (nullptr, false));
     return;
   }
 
   // If something other than null is passed, just define aOpener on our inner
   // window's JS object, wrapped into the current compartment so that for Xrays
   // we define on the Xray expando object, but don't set it on the outer window,
   // so that it'll get reset on navigation.  This is just like replaceable
   // properties, but we're not quite readonly.
--- a/dom/base/nsGlobalWindowInner.h
+++ b/dom/base/nsGlobalWindowInner.h
@@ -381,19 +381,16 @@ public:
   void NoteDOMContentLoaded();
 
   virtual nsresult FireDelayedDOMEvents() override;
 
   virtual nsresult SetNewDocument(nsIDocument *aDocument,
                                   nsISupports *aState,
                                   bool aForceReuseInnerWindow) override;
 
-  virtual void SetOpenerWindow(nsPIDOMWindowOuter* aOpener,
-                               bool aOriginalOpener) override;
-
   virtual void MaybeUpdateTouchState() override;
 
   // Inner windows only.
   void RefreshRealmPrincipal();
 
   // For accessing protected field mFullscreen
   friend class FullscreenTransitionTask;
 
--- a/dom/base/nsPIDOMWindow.h
+++ b/dom/base/nsPIDOMWindow.h
@@ -429,26 +429,16 @@ public:
    *
    * aDocument must not be null.
    */
   virtual nsresult SetNewDocument(nsIDocument *aDocument,
                                   nsISupports *aState,
                                   bool aForceReuseInnerWindow) = 0;
 
   /**
-   * Set the opener window.  aOriginalOpener is true if and only if this is the
-   * original opener for the window.  That is, it can only be true at most once
-   * during the life cycle of a window, and then only the first time
-   * SetOpenerWindow is called.  It might never be true, of course, if the
-   * window does not have an opener when it's created.
-   */
-  virtual void SetOpenerWindow(nsPIDOMWindowOuter* aOpener,
-                               bool aOriginalOpener) = 0;
-
-  /**
    * Call this to indicate that some node (this window, its document,
    * or content in that document) has a paint event listener.
    */
   void SetHasPaintEventListeners()
   {
     mMayHavePaintEventListener = true;
   }