Bug 1278985 - Remove unused URL arg from CreateChromeWindow2. r?mrbkap draft
authorMike Conley <mconley@mozilla.com>
Wed, 27 Apr 2016 16:19:25 -0400
changeset 391944 262acea3a602e141d03cafdfc4d7eb1d6e63a342
parent 391943 86816e25dea7cfcc8adbb70c575a04c8fa7be278
child 391947 9400a6d0d261f54e8b3a2650d1cd7f759fcdee37
child 391997 f3cd8cf9d0bcdfd876fa170346979af28b7827be
push id23912
push usermconley@mozilla.com
push dateFri, 22 Jul 2016 20:09:30 +0000
reviewersmrbkap
bugs1278985
milestone50.0a1
Bug 1278985 - Remove unused URL arg from CreateChromeWindow2. r?mrbkap MozReview-Commit-ID: I1H2WZeoHTJ
embedding/components/windowwatcher/nsWindowWatcher.cpp
embedding/nsIWindowCreator2.idl
toolkit/components/startup/nsAppStartup.cpp
--- a/embedding/components/windowwatcher/nsWindowWatcher.cpp
+++ b/embedding/components/windowwatcher/nsWindowWatcher.cpp
@@ -832,19 +832,18 @@ nsWindowWatcher::OpenWindowInternal(mozI
 #ifdef MOZ_WIDGET_GONK
         int retval = WinHasOption(features.get(), "mozDisplayId", 0, nullptr);
         windowCreator2->SetScreenId(retval);
 #endif
 
 
         bool cancel = false;
         rv = windowCreator2->CreateChromeWindow2(parentChrome, chromeFlags,
-                                                 contextFlags, uriToLoad,
-                                                 aOpeningTab, &cancel,
-                                                 getter_AddRefs(newChrome));
+                                                 contextFlags, aOpeningTab,
+                                                 &cancel, getter_AddRefs(newChrome));
         if (NS_SUCCEEDED(rv) && cancel) {
           newChrome = 0; // just in case
           rv = NS_ERROR_ABORT;
         }
       } else {
         rv = mWindowCreator->CreateChromeWindow(parentChrome, chromeFlags,
                                                 getter_AddRefs(newChrome));
       }
--- a/embedding/nsIWindowCreator2.idl
+++ b/embedding/nsIWindowCreator2.idl
@@ -35,33 +35,27 @@ interface nsIWindowCreator2 : nsIWindowC
   /** Create a new window. Gecko will/may call this method, if made
       available to it, to create new windows.
       @param parent Parent window, if any. Null if not. The newly created
                     window should be made a child/dependent window of
                     the parent, if any (and if the concept applies
                     to the underlying OS).
       @param chromeFlags Chrome features from nsIWebBrowserChrome
       @param contextFlags Flags about the context of the window being created.
-      @param uri The URL for which this window is intended. It can be null
-                 or zero-length. The implementation of this interface
-                 may use the URL to help determine what sort of window
-                 to open or whether to cancel window creation. It will not
-                 load the URL.
       @param aOpeningTab The TabParent that is trying to open this new chrome
                          window. Can be nullptr.
       @param cancel Return |true| to reject window creation. If true the
                     implementation has determined the window should not
                     be created at all. The caller should not default
                     to any possible backup scheme for creating the window.
       @return the new window. Will be null if canceled or an error occurred.
   */
   nsIWebBrowserChrome createChromeWindow2(in nsIWebBrowserChrome parent,
                                           in uint32_t chromeFlags,
                                           in uint32_t contextFlags,
-                                          in nsIURI uri,
                                           in nsITabParent aOpeningTab,
                                           out boolean cancel);
 
   /**
    * B2G multi-screen support. When open another top-level window on b2g,
    * a screen ID is needed for identifying which screen this window is
    * opened to.
    * @param aScreenId Differentiate screens of windows. It is platform-
--- a/toolkit/components/startup/nsAppStartup.cpp
+++ b/toolkit/components/startup/nsAppStartup.cpp
@@ -609,17 +609,17 @@ nsAppStartup::GetInterrupted(bool *aInte
 //
 
 NS_IMETHODIMP
 nsAppStartup::CreateChromeWindow(nsIWebBrowserChrome *aParent,
                                  uint32_t aChromeFlags,
                                  nsIWebBrowserChrome **_retval)
 {
   bool cancel;
-  return CreateChromeWindow2(aParent, aChromeFlags, 0, 0, nullptr, &cancel, _retval);
+  return CreateChromeWindow2(aParent, aChromeFlags, 0, nullptr, &cancel, _retval);
 }
 
 
 //
 // nsAppStartup->nsIWindowCreator2
 //
 
 NS_IMETHODIMP
@@ -632,17 +632,16 @@ nsAppStartup::SetScreenId(uint32_t aScre
 
   return appShell->SetScreenId(aScreenId);
 }
 
 NS_IMETHODIMP
 nsAppStartup::CreateChromeWindow2(nsIWebBrowserChrome *aParent,
                                   uint32_t aChromeFlags,
                                   uint32_t aContextFlags,
-                                  nsIURI *aURI,
                                   nsITabParent *aOpeningTab,
                                   bool *aCancel,
                                   nsIWebBrowserChrome **_retval)
 {
   NS_ENSURE_ARG_POINTER(aCancel);
   NS_ENSURE_ARG_POINTER(_retval);
   *aCancel = false;
   *_retval = 0;