Bug 1552538 - Check for gBrowser before checking for pinned tabs r=r1cky
authorEd Lee <edilee@mozilla.com>
Sun, 19 May 2019 11:04:16 +0000
changeset 533283 4a74609752d2e77e4be401e92978c9c32a842b40
parent 533282 3a6ea5b272d35eb9cd96401c35bacc6f4d28126c
child 533284 4478ea184906f92ad82672ca5e91ae96a3a34107
child 533290 a757325b769035a6b9d395e524d80070b92432cf
push id11276
push userrgurzau@mozilla.com
push dateMon, 20 May 2019 13:11:24 +0000
treeherdermozilla-beta@847755a7c325 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersr1cky
bugs1552538
milestone68.0a1
first release with
nightly linux32
4a74609752d2 / 68.0a1 / 20190519213707 / files
nightly linux64
4a74609752d2 / 68.0a1 / 20190519213707 / files
nightly mac
4a74609752d2 / 68.0a1 / 20190519213707 / files
nightly win32
4a74609752d2 / 68.0a1 / 20190519213707 / files
nightly win64
4a74609752d2 / 68.0a1 / 20190519213707 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1552538 - Check for gBrowser before checking for pinned tabs r=r1cky Differential Revision: https://phabricator.services.mozilla.com/D31735
browser/components/newtab/lib/ASRouterTargeting.jsm
--- a/browser/components/newtab/lib/ASRouterTargeting.jsm
+++ b/browser/components/newtab/lib/ASRouterTargeting.jsm
@@ -293,17 +293,17 @@ const TargetingGetters = {
   get region() {
     return Services.prefs.getStringPref(SEARCH_REGION_PREF, "");
   },
   get needsUpdate() {
     return QueryCache.queries.CheckBrowserNeedsUpdate.get();
   },
   get hasPinnedTabs() {
     for (let win of Services.wm.getEnumerator("navigator:browser")) {
-      if (win.closed) {
+      if (win.closed || !win.ownerGlobal.gBrowser) {
         continue;
       }
       if (win.ownerGlobal.gBrowser.visibleTabs.filter(t => t.pinned).length) {
         return true;
       }
     }
 
     return false;