diff --git a/content/base/src/nsTextFragment.h b/content/base/src/nsTextFragment.h index 2d9f70edd89..8a857c90aed 100644 --- a/content/base/src/nsTextFragment.h +++ b/content/base/src/nsTextFragment.h @@ -218,6 +218,12 @@ public: return mState.mIs2b ? m2b[aIndex] : PRUnichar(m1b[aIndex]); } + struct FragmentBits { + PRBool mInHeap : 1; + PRBool mIs2b : 1; + PRUint32 mLength : 30; + }; + protected: void ReleaseText(); @@ -228,11 +234,7 @@ protected: union { PRUint32 mAllBits; - struct { - PRBool mInHeap : 1; - PRBool mIs2b : 1; - PRUint32 mLength : 30; - } mState; + FragmentBits mState; }; }; diff --git a/content/shared/public/nsTextFragment.h b/content/shared/public/nsTextFragment.h index 2d9f70edd89..8a857c90aed 100644 --- a/content/shared/public/nsTextFragment.h +++ b/content/shared/public/nsTextFragment.h @@ -218,6 +218,12 @@ public: return mState.mIs2b ? m2b[aIndex] : PRUnichar(m1b[aIndex]); } + struct FragmentBits { + PRBool mInHeap : 1; + PRBool mIs2b : 1; + PRUint32 mLength : 30; + }; + protected: void ReleaseText(); @@ -228,11 +234,7 @@ protected: union { PRUint32 mAllBits; - struct { - PRBool mInHeap : 1; - PRBool mIs2b : 1; - PRUint32 mLength : 30; - } mState; + FragmentBits mState; }; };