Bug 1545983 - Update "Recent Closed Tabs" and "Recent Closed Windows" menus to reference their menupopup correctly r=Gijs
authorBrian Grinstead <bgrinstead@mozilla.com>
Mon, 22 Apr 2019 10:14:44 +0000
changeset 470342 61587f94c1729e446879c995386ba60fc31f39ba
parent 470341 355f26707b354faec37e740b99950e70ab3221fc
child 470343 3c1b4fc52fe292fa01cb4ed4ea7f5ac4b0a05bc3
push id112865
push usershindli@mozilla.com
push dateMon, 22 Apr 2019 15:52:44 +0000
treeherdermozilla-inbound@b4b482a09cf0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersGijs
bugs1545983
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1545983 - Update "Recent Closed Tabs" and "Recent Closed Windows" menus to reference their menupopup correctly r=Gijs Differential Revision: https://phabricator.services.mozilla.com/D28298
browser/base/content/browser-places.js
--- a/browser/base/content/browser-places.js
+++ b/browser/base/content/browser-places.js
@@ -597,17 +597,17 @@ HistoryMenu.prototype = {
     else
       this.undoTabMenu.removeAttribute("disabled");
   },
 
   /**
    * Populate when the history menu is opened
    */
   populateUndoSubmenu: function PHM_populateUndoSubmenu() {
-    var undoPopup = this.undoTabMenu.firstChild;
+    var undoPopup = this.undoTabMenu.menupopup;
 
     // remove existing menu items
     while (undoPopup.hasChildNodes())
       undoPopup.firstChild.remove();
 
     // no restorable tabs, so make sure menu is disabled, and return
     if (this._getClosedTabCount() == 0) {
       this.undoTabMenu.setAttribute("disabled", true);
@@ -630,17 +630,17 @@ HistoryMenu.prototype = {
     else
       this.undoWindowMenu.removeAttribute("disabled");
   },
 
   /**
    * Populate when the history menu is opened
    */
   populateUndoWindowSubmenu: function PHM_populateUndoWindowSubmenu() {
-    let undoPopup = this.undoWindowMenu.firstChild;
+    let undoPopup = this.undoWindowMenu.menupopup;
 
     // remove existing menu items
     while (undoPopup.hasChildNodes())
       undoPopup.firstChild.remove();
 
     // no restorable windows, so make sure menu is disabled, and return
     if (SessionStore.getClosedWindowCount() == 0) {
       this.undoWindowMenu.setAttribute("disabled", true);