зеркало из https://github.com/mozilla/pjs.git
Bug 586555 - groupItemStorageSanity: if it's a check, let's really check it! r=tim
This commit is contained in:
Родитель
9ee06f4b3f
Коммит
d6209059c7
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче