Bug 829369: Cast pointer-subtraction to a size_t (after ensuring it'll be nonnegative) when comparing it to a nsTArray's size, to fix signed/unsigned comparison build warning. r=dbaron

This commit is contained in:
Daniel Holbert 2013-01-12 01:56:15 -08:00
parent 99f8c4d6a6
commit a86f8f4b14

View File

@ -285,9 +285,10 @@ ElementAnimations::EnsureStyleRuleFor(TimeStamp aRefreshTime,
}
NS_ABORT_IF_FALSE(segment->mFromKey < segment->mToKey,
"incorrect keys");
NS_ABORT_IF_FALSE(segment - prop.mSegments.Elements() <
NS_ABORT_IF_FALSE(segment >= prop.mSegments.Elements() &&
size_t(segment - prop.mSegments.Elements()) <
prop.mSegments.Length(),
"ran off end");
"out of array bounds");
if (!mStyleRule) {
// Allocate the style rule now that we know we have animation data.