Backed out changeset 54ebf85e8731 (bug 1219788) for leaks in many mochitests on Linux. r=backout
authorSebastian Hengst <archaeopteryx@coole-files.de>
Sat, 21 May 2016 09:35:06 +0200
changeset 322695 b7756d054ba86fd2a6a9bd851dbd58b0b4542b42
parent 322694 54ebf85e87313800ab3b4412861a9d49cef7e2ff
child 322696 62a14696a5a71de6ddea031c128f46c8662662d2
push id9671
push userraliiev@mozilla.com
push dateMon, 06 Jun 2016 20:27:52 +0000
treeherdermozilla-aurora@cea65ca3d0bd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1219788
milestone49.0a1
backs out54ebf85e87313800ab3b4412861a9d49cef7e2ff
Backed out changeset 54ebf85e8731 (bug 1219788) for leaks in many mochitests on Linux. r=backout
browser/base/content/browser-places.js
browser/base/content/browser.js
browser/components/places/content/editBookmarkOverlay.js
--- a/browser/base/content/browser-places.js
+++ b/browser/base/content/browser-places.js
@@ -1941,32 +1941,8 @@ var BookmarkingUI = {
     if (aNode.getAttribute("label") != this._starButtonLabel)
       aNode.setAttribute("label", this._starButtonLabel);
   },
 
   QueryInterface: XPCOMUtils.generateQI([
     Ci.nsINavBookmarkObserver
   ])
 };
-
-var AutoShowBookmarksToolbar = {
-  init() {
-    Services.obs.addObserver(this, "autoshow-bookmarks-toolbar", false);
-  },
-
-  uninit() {
-    Services.obs.removeObserver(this, "autoshow-bookmarks-toolbar");
-  },
-
-  observe(subject, topic, data) {
-    let toolbar = document.getElementById("PersonalToolbar");
-    if (!toolbar.collapsed)
-      return;
-
-    let placement = CustomizableUI.getPlacementOfWidget("personal-bookmarks");
-    let area = placement && placement.area;
-    if (area != CustomizableUI.AREA_BOOKMARKS)
-      return;
-
-    setToolbarVisibility(toolbar, true);
-  }
-};
-
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -1195,17 +1195,16 @@ var gBrowserInit = {
         gBrowser.selectedBrowser.focus();
       }
     }
 
     // Enable/Disable auto-hide tabbar
     gBrowser.tabContainer.updateVisibility();
 
     BookmarkingUI.init();
-    AutoShowBookmarksToolbar.init();
 
     gPrefService.addObserver(gHomeButton.prefDomain, gHomeButton, false);
 
     var homeButton = document.getElementById("home-button");
     gHomeButton.updateTooltip(homeButton);
 
     let safeMode = document.getElementById("helpSafeMode");
     if (Services.appinfo.inSafeMode) {
@@ -1425,16 +1424,18 @@ var gBrowserInit = {
     try {
       gBrowser.removeProgressListener(window.XULBrowserWindow);
       gBrowser.removeTabsProgressListener(window.TabsProgressListener);
     } catch (ex) {
     }
 
     PlacesToolbarHelper.uninit();
 
+    BookmarkingUI.uninit();
+
     TabsInTitlebar.uninit();
 
     ToolbarIconColor.uninit();
 
     TabletModeUpdater.uninit();
 
     gTabletModePageCounter.finish();
 
@@ -1488,18 +1489,16 @@ var gBrowserInit = {
       if (this.gmpInstallManager) {
         this.gmpInstallManager.uninit();
       }
 
       BrowserOffline.uninit();
       IndexedDBPromptHelper.uninit();
       LightweightThemeListener.uninit();
       PanelUI.uninit();
-      BookmarkingUI.uninit();
-      AutoShowBookmarksToolbar.uninit();
     }
 
     // Final window teardown, do this last.
     window.XULBrowserWindow = null;
     window.QueryInterface(Ci.nsIInterfaceRequestor)
           .getInterface(Ci.nsIWebNavigation)
           .QueryInterface(Ci.nsIDocShellTreeItem).treeOwner
           .QueryInterface(Ci.nsIInterfaceRequestor)
--- a/browser/components/places/content/editBookmarkOverlay.js
+++ b/browser/components/places/content/editBookmarkOverlay.js
@@ -756,21 +756,16 @@ var gEditItemOverlay = {
       // Mark the containing folder as recently-used if it isn't in the
       // static list
       if (containerId != PlacesUtils.unfiledBookmarksFolderId &&
           containerId != PlacesUtils.toolbarFolderId &&
           containerId != PlacesUtils.bookmarksMenuFolderId) {
         this._markFolderAsRecentlyUsed(containerId)
             .catch(Components.utils.reportError);
       }
-
-      // Auto-show the bookmarks toolbar when adding / moving an item there.
-      if (containerId == PlacesUtils.toolbarFolderId) {
-        Services.obs.notifyObservers(null, "autoshow-bookmarks-toolbar", null);
-      }
     }
 
     // Update folder-tree selection
     var folderTreeRow = this._element("folderTreeRow");
     if (!folderTreeRow.collapsed) {
       var selectedNode = this._folderTree.selectedNode;
       if (!selectedNode ||
           PlacesUtils.getConcreteItemId(selectedNode) != containerId)