DescriptionShould not ASSERT what we know will fail.
The input to the selector position and the rule position is known to
possibly overflow 12 and 18 bits respectively since the input comes from
unsigned positions into data structures known to keep more elements than
that. The selector and rule positions will be wrong regardlessly, unless
we make RuleData bigger.
Truncating the position to a max value instead of just letting it
overflow could be an option. It doesn't make sense for selector position
as trying to match any of the other selectors won't make any difference.
Truncating the rule position would make the cascading order correct when
comparing rules in the representable range with a rule outside the range,
while just letting it overflow starting from zero again will yield a
correct cascading order between two rules both outside of the
representable range.
Given that, I conclude to just remove the ASSERTs and not do anything
clever about values outside of the ranges.
BUG=519315
R=timloh@chromium.org
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=201059
Patch Set 1 #
Messages
Total messages: 9 (3 generated)
|