☠☠ backed out by 42a8ed44e75c ☠ ☠ | |
author | Eric Rahm <erahm@mozilla.com> |
Mon, 23 May 2016 15:05:19 -0700 | |
changeset 298740 | ac9e8b31ac78cbef46ee425d030e1ccc0f7de968 |
parent 298739 | ffe20266c00e83906a3a974ee06092e5ea80e008 |
child 298741 | 6afb408165adbb6431a8ad7aa428861bef0177ea |
push id | 30285 |
push user | cbook@mozilla.com |
push date | Wed, 25 May 2016 13:06:07 +0000 |
treeherder | mozilla-central@d6d4e8417d2f [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | froydnj |
bugs | 1275064 |
milestone | 49.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/extensions/spellcheck/src/mozInlineSpellWordUtil.h +++ b/extensions/spellcheck/src/mozInlineSpellWordUtil.h @@ -120,23 +120,24 @@ private: : mNodeOffset(aNodeOffset), mSoftTextOffset(aSoftTextOffset), mLength(aLength) {} }; nsTArray<DOMTextMapping> mSoftTextDOMMapping; // A list of the "real words" in mSoftText, ordered by mSoftTextOffset struct RealWord { int32_t mSoftTextOffset; - int32_t mLength : 31; - int32_t mCheckableWord : 1; + uint32_t mLength : 31; + uint32_t mCheckableWord : 1; - RealWord(int32_t aOffset, int32_t aLength, bool aCheckable) + RealWord(int32_t aOffset, uint32_t aLength, bool aCheckable) : mSoftTextOffset(aOffset), mLength(aLength), mCheckableWord(aCheckable) { static_assert(sizeof(RealWord) == 8, "RealWord should be limited to 8 bytes"); + MOZ_ASSERT(aLength < INT32_MAX, "Word length is too large to fit in the bitfield"); } int32_t EndOffset() const { return mSoftTextOffset + mLength; } }; nsTArray<RealWord> mRealWords; int32_t mNextWordIndex; bool mSoftTextValid;