From c403f8b002fcd10edee99d0498a1067971eb0324 Mon Sep 17 00:00:00 2001 From: Felipe Gomes Date: Fri, 1 Mar 2019 21:07:00 +0000 Subject: [PATCH] Bug 827976 - browser-places.js doesn't need to get a reference to the hidden window. r=mak Differential Revision: https://phabricator.services.mozilla.com/D21080 --HG-- extra : moz-landing-system : lando --- browser/base/content/browser-places.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/browser/base/content/browser-places.js b/browser/base/content/browser-places.js index ca6a1390a924..cd58e5880a22 100755 --- a/browser/base/content/browser-places.js +++ b/browser/base/content/browser-places.js @@ -572,12 +572,12 @@ HistoryMenu.prototype = { }, _getClosedTabCount() { - // SessionStore doesn't track the hidden window, so just return zero then. - if (window == Services.appShell.hiddenDOMWindow) { + try { + return SessionStore.getClosedTabCount(window); + } catch (ex) { + // SessionStore doesn't track the hidden window, so just return zero then. return 0; } - - return SessionStore.getClosedTabCount(window); }, toggleHiddenTabs() {