author | Xidorn Quan <quanxunzhen@gmail.com> |
Fri, 20 Nov 2015 14:31:38 +1100 | |
changeset 273455 | 80dc69d21994a554b3041c5ebc7f5572e4a42c09 |
parent 273454 | 1946937e23afd1e6783d2f83737b074fa680c9a8 |
child 273456 | 652bd59cdb5153cac5a7d1720ccd546862130144 |
push id | 29702 |
push user | cbook@mozilla.com |
push date | Fri, 20 Nov 2015 12:13:22 +0000 |
treeherder | mozilla-central@ec628289d8b4 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
bugs | 1224464 |
milestone | 45.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/layout/style/nsCSSProps.cpp +++ b/layout/style/nsCSSProps.cpp @@ -2286,18 +2286,20 @@ nsCSSProps::FindKeyword(nsCSSKeyword aKe return true; } return false; } nsCSSKeyword nsCSSProps::ValueToKeywordEnum(int32_t aValue, const KTableEntry aTable[]) { +#ifdef DEBUG typedef decltype(aTable[0].mValue) table_value_type; NS_ASSERTION(table_value_type(aValue) == aValue, "Value out of range"); +#endif for (int32_t i = 0; ; ++i) { const KTableEntry& entry = aTable[i]; if (::IsKeyValSentinel(entry)) { break; } if (aValue == entry.mValue) { return entry.mKeyword; } @@ -2328,18 +2330,20 @@ nsCSSProps::kKeywordTableTable[eCSSPrope #undef CSS_PROP }; const nsAFlatCString& nsCSSProps::LookupPropertyValue(nsCSSProperty aProp, int32_t aValue) { MOZ_ASSERT(aProp >= 0 && aProp < eCSSProperty_COUNT, "property out of range"); +#ifdef DEBUG typedef decltype(KTableEntry::mValue) table_value_type; NS_ASSERTION(table_value_type(aValue) == aValue, "Value out of range"); +#endif const KTableEntry* kwtable = nullptr; if (aProp < eCSSProperty_COUNT_no_shorthands) kwtable = kKeywordTableTable[aProp]; if (kwtable) return ValueToKeyword(aValue, kwtable);