From f3f9b7b06e37f870463a5f2196457cca6b10d700 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Thu, 22 Feb 2018 11:57:51 +0100 Subject: Prevent issues and possible leaks with the bookmarks menu bar as a result of XBL re-binding. --- browser/base/content/browser-places.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'browser/base/content/browser-places.js') diff --git a/browser/base/content/browser-places.js b/browser/base/content/browser-places.js index 14e90cde2..de880d11d 100644 --- a/browser/base/content/browser-places.js +++ b/browser/base/content/browser-places.js @@ -1555,6 +1555,10 @@ var BookmarkingUI = { // so kill current view and let popupshowing generate a new one. if (this.button._placesView) this.button._placesView.uninit(); + // ...and do the same for the menu bar. + let menubar = document.getElementById("bookmarksMenu"); + if (menubar._placesview) + menubar._placesview.uninit(); // We have to do the same thing for the "special" views underneath the // the bookmarks menu. -- cgit v1.2.3 From 7eb2c156ba826a0ebf05db56a9fccf46094478ea Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Fri, 23 Feb 2018 09:39:10 +0100 Subject: Fix typo in f3f9b7b06e37f870463a5f2196457cca6b10d700 (caps) --- browser/base/content/browser-places.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'browser/base/content/browser-places.js') diff --git a/browser/base/content/browser-places.js b/browser/base/content/browser-places.js index de880d11d..a447880be 100644 --- a/browser/base/content/browser-places.js +++ b/browser/base/content/browser-places.js @@ -1557,8 +1557,8 @@ var BookmarkingUI = { this.button._placesView.uninit(); // ...and do the same for the menu bar. let menubar = document.getElementById("bookmarksMenu"); - if (menubar._placesview) - menubar._placesview.uninit(); + if (menubar && menubar._placesView) + menubar._placesView.uninit(); // We have to do the same thing for the "special" views underneath the // the bookmarks menu. -- cgit v1.2.3