зеркало из https://github.com/mozilla/gecko-dev.git
Bug 793880 - Fix the assertion in nsCSSSelector::SetPseudoType to shut up the compiler warning; r=dholbert
--HG-- extra : rebase_source : 058dcc17c37915fa9937f7eafb1b3a93b78384f2
This commit is contained in:
Родитель
144130a844
Коммит
ec1aa47e36
|
@ -183,7 +183,9 @@ public:
|
||||||
return static_cast<nsCSSPseudoElements::Type>(mPseudoType);
|
return static_cast<nsCSSPseudoElements::Type>(mPseudoType);
|
||||||
}
|
}
|
||||||
void SetPseudoType(nsCSSPseudoElements::Type aType) {
|
void SetPseudoType(nsCSSPseudoElements::Type aType) {
|
||||||
NS_ASSERTION(aType > INT16_MIN && aType < INT16_MAX, "Out of bounds");
|
NS_ASSERTION(static_cast<int32_t>(aType) >= INT16_MIN &&
|
||||||
|
static_cast<int32_t>(aType) <= INT16_MAX,
|
||||||
|
"Out of bounds - this will overflow mPseudoType");
|
||||||
mPseudoType = static_cast<int16_t>(aType);
|
mPseudoType = static_cast<int16_t>(aType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче