mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-14 20:22:00 +00:00
Bug 827687, patch 2: Be more careful walking segments. r=bzbarsky
This commit is contained in:
parent
aad277663c
commit
1fb6ad9b36
@ -254,14 +254,22 @@ ElementAnimations::EnsureStyleRuleFor(TimeStamp aRefreshTime,
|
||||
"has no segments");
|
||||
|
||||
// FIXME: Maybe cache the current segment?
|
||||
const AnimationPropertySegment *segment = prop.mSegments.Elements();
|
||||
const AnimationPropertySegment *segment = prop.mSegments.Elements(),
|
||||
*segmentEnd = segment + prop.mSegments.Length();
|
||||
while (segment->mToKey < positionInIteration) {
|
||||
NS_ABORT_IF_FALSE(segment->mFromKey < segment->mToKey,
|
||||
"incorrect keys");
|
||||
++segment;
|
||||
if (segment == segmentEnd) {
|
||||
NS_ABORT_IF_FALSE(false, "incorrect positionInIteration");
|
||||
break; // in order to continue in outer loop (just below)
|
||||
}
|
||||
NS_ABORT_IF_FALSE(segment->mFromKey == (segment-1)->mToKey,
|
||||
"incorrect keys");
|
||||
}
|
||||
if (segment == segmentEnd) {
|
||||
continue;
|
||||
}
|
||||
NS_ABORT_IF_FALSE(segment->mFromKey < segment->mToKey,
|
||||
"incorrect keys");
|
||||
NS_ABORT_IF_FALSE(segment - prop.mSegments.Elements() <
|
||||
|
Loading…
x
Reference in New Issue
Block a user