From 84cbe40194646cb6e851ff0649f053e1c85ff855 Mon Sep 17 00:00:00 2001 From: Raymond Lee Date: Thu, 4 Aug 2011 23:40:10 +0800 Subject: [PATCH] Bug 586555 - groupItemStorageSanity: if it's a check, let's really check it! r=tim --- browser/base/content/tabview/groupitems.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/browser/base/content/tabview/groupitems.js b/browser/base/content/tabview/groupitems.js index bd7a55d11743..69329a3e5b4c 100644 --- a/browser/base/content/tabview/groupitems.js +++ b/browser/base/content/tabview/groupitems.js @@ -2233,12 +2233,14 @@ let GroupItems = { // Function: groupItemStorageSanity // Given persistent storage data for a groupItem, returns true if it appears to not be damaged. groupItemStorageSanity: function GroupItems_groupItemStorageSanity(groupItemData) { - // TODO: check everything - // Bug 586555 - var sane = true; - if (!Utils.isRect(groupItemData.bounds)) { + let sane = true; + if (!groupItemData.bounds || !Utils.isRect(groupItemData.bounds)) { Utils.log('GroupItems.groupItemStorageSanity: bad bounds', groupItemData.bounds); sane = false; + } else if ((groupItemData.userSize && + !Utils.isPoint(groupItemData.userSize)) || + !groupItemData.id) { + sane = false; } return sane;