Bug 1595424 - Remove unused openTopWin function. r=IanN a=IanN CLOSED TREE
authorFrank-Rainer Grahl <frgrahl@gmx.net>
Tue, 19 Nov 2019 17:50:29 +0100
changeset 32371 6e271c9fc6b49bc46d1bb217d03a088ac60c085f
parent 32370 82d3335dc616590cf8a2802c190f03923ac9dd8b
child 32372 cac640087f90d7114613af31001ee8b7659a5a6b
push id230
push userfrgrahl@gmx.net
push dateTue, 19 Nov 2019 16:51:10 +0000
treeherdercomm-esr60@232db96d678a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersIanN, IanN
bugs1595424
Bug 1595424 - Remove unused openTopWin function. r=IanN a=IanN CLOSED TREE
suite/base/content/utilityOverlay.js
--- a/suite/base/content/utilityOverlay.js
+++ b/suite/base/content/utilityOverlay.js
@@ -597,48 +597,16 @@ function isRestricted( url )
     return Cc["@mozilla.org/network/util;1"]
              .getService(Ci.nsINetUtil)
              .URIChainHasFlags(uri, URI_INHERITS_SECURITY_CONTEXT);
   } catch (e) {
     return false;
   }
 }
 
-function openTopWin( url, opener )
-{
-    /* note that this chrome url should probably change to not have
-       all of the navigator controls, but if we do this we need to have
-       the option for chrome controls because goClickThrobber() needs to
-       use this function with chrome controls */
-    /* also, do we want to
-       limit the number of help windows that can be spawned? */
-    if ((url == null) || (url == "")) return null;
-
-    // avoid loading "", since this loads a directory listing
-    if (url == "") {
-        url = "about:blank";
-    }
-
-    var topWindowOfType = getTopWin();
-    if ( topWindowOfType )
-    {
-        if (!opener || !isRestricted(url))
-            topWindowOfType.loadURI(url);
-        else if (topWindowOfType.content == opener.top)
-            opener.open(url, "_top");
-        else
-            topWindowOfType.getBrowser().loadURIWithFlags(url,
-                Ci.nsIWebNavigation.LOAD_FLAGS_FROM_EXTERNAL);
-
-        topWindowOfType.content.focus();
-        return topWindowOfType;
-    }
-    return window.openDialog( getBrowserURL(), "_blank", "chrome,all,dialog=no", url );
-}
-
 function goAbout(aProtocol)
 {
   var target;
   var url = "about:" + (aProtocol || "");
   var defaultAboutState = Services.prefs.getIntPref("browser.link.open_external");
 
   switch (defaultAboutState) {
   case kNewWindow: