Bug 1533750 - pack members of PermissionEntry better on 64-bit platforms; r=jdm

The current ordering leaves a hole after `mExpireType` due to the need
to align a 64-bit `mExpireTime` and another one after
`mNonSessionExpireTime` to pad out the structure.  We can group members
by their type (and initialize them in that order to avoid compiler
warnings) to avoid the holes and save a little bit of space.

Differential Revision: https://phabricator.services.mozilla.com/D22713

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Nathan Froyd 2019-03-11 18:36:44 +00:00
Родитель adcc1ec434
Коммит 646507261e
1 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -49,21 +49,21 @@ class nsPermissionManager final : public nsIPermissionManager,
uint32_t aExpireType, int64_t aExpireTime,
int64_t aModificationTime)
: mID(aID),
mExpireTime(aExpireTime),
mModificationTime(aModificationTime),
mType(aType),
mPermission(aPermission),
mExpireType(aExpireType),
mExpireTime(aExpireTime),
mModificationTime(aModificationTime),
mNonSessionPermission(aPermission),
mNonSessionExpireType(aExpireType),
mNonSessionExpireTime(aExpireTime) {}
int64_t mID;
int64_t mExpireTime;
int64_t mModificationTime;
uint32_t mType;
uint32_t mPermission;
uint32_t mExpireType;
int64_t mExpireTime;
int64_t mModificationTime;
uint32_t mNonSessionPermission;
uint32_t mNonSessionExpireType;
uint32_t mNonSessionExpireTime;