Backed out changeset 81df156cb345 (bug 1250203) for test failures in mochitest-5 test_ext_bookmarks.html, browser-chrome browser_views_liveupdate.js, OS X xpcshell test_browserGlue_migrate.js and maybe more. r=backout on a CLOSED TREE
authorSebastian Hengst <archaeopteryx@coole-files.de>
Fri, 08 Apr 2016 18:42:07 +0200
changeset 349006 9c492faa4c397c9fd2a9448fce84117d0e2f8a2a
parent 349005 6fab7914b572399607d6da90fca295c41ef2f73c
child 349007 7ddc5c22f1322e3c5992704f06901278dbd9c7d0
push id14989
push userdtownsend@mozilla.com
push dateFri, 08 Apr 2016 20:09:09 +0000
reviewersbackout
bugs1250203
milestone48.0a1
backs out81df156cb345cc8a11b46c4f11783c03047c4694
Backed out changeset 81df156cb345 (bug 1250203) for test failures in mochitest-5 test_ext_bookmarks.html, browser-chrome browser_views_liveupdate.js, OS X xpcshell test_browserGlue_migrate.js and maybe more. r=backout on a CLOSED TREE
browser/base/content/browser-places.js
--- a/browser/base/content/browser-places.js
+++ b/browser/base/content/browser-places.js
@@ -1402,43 +1402,16 @@ var BookmarkingUI = {
       item.addEventListener("command", onItemCommand);
       if (icon) {
         item.setAttribute("image", icon);
       }
       fragment.appendChild(item);
     }
     root.containerOpen = false;
     aHeaderItem.parentNode.insertBefore(fragment, aHeaderItem.nextSibling);
-
-    // Update the menu when a bookmark is being removed.
-    // The native menubar on Mac doesn't support live update, so this won't
-    // work there.
-    let observer = {
-      onItemAdded() {},
-      onBeginUpdateBatch() {},
-      onEndUpdateBatch() {},
-      onItemRemoved() {
-        removeObserver();
-        BookmarkingUI._updateRecentBookmarks(aHeaderItem, extraCSSClass);
-      },
-      onItemChanged() {},
-      onItemVisited() {},
-      onItemMoved() {}
-    };
-    PlacesUtils.bookmarks.addObserver(observer, false);
-
-    let popup = aHeaderItem.parentNode;
-    let removeObserver = function (event) {
-      if (event && event.target != popup) {
-        return;
-      }
-      PlacesUtils.bookmarks.removeObserver(observer);
-      popup.removeEventListener("popuphidden", removeObserver);
-    };
-    popup.addEventListener("popuphidden", removeObserver);
   },
 
   /**
    * Handles star styling based on page proxy state changes.
    */
   onPageProxyStateChanged: function BUI_onPageProxyStateChanged(aState) {
     if (!this._shouldUpdateStarState() || !this.star) {
       return;