Bug 1464496 - Part 2: Move the mRaw before the two booleans for better packing r=emilio

MozReview-Commit-ID: Gi4Is7RgVmN

--HG--
extra : rebase_source : d72bd97913d76c28698fe362e90361f77306c783
This commit is contained in:
Nazım Can Altınova 2018-05-31 10:31:44 +02:00
Родитель 361380987c
Коммит ced506ea81
1 изменённых файлов: 6 добавлений и 6 удалений

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

@ -31,9 +31,9 @@ class DeclarationBlock final
public:
explicit DeclarationBlock(
already_AddRefed<RawServoDeclarationBlock> aRaw)
: mImmutable(false)
: mRaw(aRaw)
, mImmutable(false)
, mIsDirty(false)
, mRaw(aRaw)
{
mContainer.mRaw = 0;
}
@ -42,9 +42,9 @@ public:
: DeclarationBlock(Servo_DeclarationBlock_CreateEmpty().Consume()) {}
DeclarationBlock(const DeclarationBlock& aCopy)
: mImmutable(false)
: mRaw(Servo_DeclarationBlock_Clone(aCopy.mRaw).Consume())
, mImmutable(false)
, mIsDirty(false)
, mRaw(Servo_DeclarationBlock_Clone(aCopy.mRaw).Consume())
{
mContainer.mRaw = 0;
}
@ -209,6 +209,8 @@ private:
nsHTMLCSSStyleSheet* mHTMLCSSStyleSheet;
} mContainer;
RefPtr<RawServoDeclarationBlock> mRaw;
// set when declaration put in the rule tree;
bool mImmutable;
@ -224,8 +226,6 @@ private:
// reference, and there is no problem with another user of the same
// DeclarationBlock thinking that it is not dirty.
Atomic<bool, MemoryOrdering::Relaxed> mIsDirty;
RefPtr<RawServoDeclarationBlock> mRaw;
};
} // namespace mozilla