Bug 586360 - Add-ons manager doesn't open if all windows are closed. r=Neil f=stefanh
authorJustin Wood <Callek@gmail.com>
Thu, 02 Sep 2010 01:12:30 -0400
changeset 6328 a12d80667637a0645367cf4cf1f927ec21c20775
parent 6327 7fbe67b916309be7a244e7be0b8b2f44068ce5e8
child 6329 3a5ccff4af385560ed056f69137057a2e0808046
push idunknown
push userunknown
push dateunknown
reviewersNeil
bugs586360
Bug 586360 - Add-ons manager doesn't open if all windows are closed. r=Neil f=stefanh
suite/common/utilityOverlay.js
--- a/suite/common/utilityOverlay.js
+++ b/suite/common/utilityOverlay.js
@@ -1336,17 +1336,17 @@ function openUILinkArrayIn(urlArray, whe
  * @param aOpenNew
  *        True to open a new tab and switch to it, if no existing tab is found
  * @param A callback to call when the tab is open, the tab's browser will be
  *        passed as an argument
  * @return True if a tab was switched to (or opened), false otherwise
  */
 function switchToTabHavingURI(aURI, aOpenNew, aCallback) {
   function switchIfURIInWindow(aWindow) {
-    if (!("gBrowser" in aWindow))
+    if (!aWindow.gBrowser)
       return false;
     let browsers = aWindow.gBrowser.browsers;
     for (let i = 0; i < browsers.length; i++) {
       let browser = browsers[i];
       if (browser.currentURI.equals(aURI)) {
         // Focus the matching window & tab
         aWindow.focus();
         aWindow.gBrowser.tabContainer.selectedIndex = i;