mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-06 09:05:45 +00:00
Bug 586555 - groupItemStorageSanity: if it's a check, let's really check it! r=tim
This commit is contained in:
parent
8c09fbac55
commit
84cbe40194
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user