From ced506ea8147a00e04e1732389991012e58c4dab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Naz=C4=B1m=20Can=20Alt=C4=B1nova?= Date: Thu, 31 May 2018 10:31:44 +0200 Subject: [PATCH] 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 --- layout/style/DeclarationBlock.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/layout/style/DeclarationBlock.h b/layout/style/DeclarationBlock.h index 9bb6998bf00c..188dc601e412 100644 --- a/layout/style/DeclarationBlock.h +++ b/layout/style/DeclarationBlock.h @@ -31,9 +31,9 @@ class DeclarationBlock final public: explicit DeclarationBlock( already_AddRefed 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 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 mIsDirty; - - RefPtr mRaw; }; } // namespace mozilla