Skip to content
This repository has been archived by the owner on Aug 4, 2022. It is now read-only.

Commit

Permalink
Bug 1334582 - Use UINT64_MAX instead of IsInfinite() for checking whe…
Browse files Browse the repository at this point in the history
…ther TimingParans.mIterations is infinite or not. r=boris

Because our ComputedTiming.mCurrentIteration is uint64_t.

MozReview-Commit-ID: FjbhEvTUMr4
  • Loading branch information
Hiroyuki Ikezoe committed Sep 11, 2017
1 parent 472e325 commit dccd6cb
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion dom/animation/AnimationEffectReadOnly.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ AnimationEffectReadOnly::GetComputedTimingAt(
// Determine the 0-based index of the current iteration.
// https://w3c.github.io/web-animations/#current-iteration
result.mCurrentIteration =
IsInfinite(result.mIterations) &&
result.mIterations >= UINT64_MAX &&
result.mPhase == ComputedTiming::AnimationPhase::After
? UINT64_MAX // In GetComputedTimingDictionary(),
// we will convert this into Infinity
Expand Down
11 changes: 11 additions & 0 deletions dom/animation/test/crashtests/1334582-1.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<script>
window.onload = function(){
let a = document.documentElement.animate([], {"iterations": 1.7976931348623157e+308, "fill": "both"});
};
</script>
</head>
</html>
1 change: 1 addition & 0 deletions dom/animation/test/crashtests/crashtests.list
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ pref(dom.animations-api.core.enabled,true) load 1330190-2.html
pref(dom.animations-api.core.enabled,true) load 1330513-1.html
pref(dom.animations-api.core.enabled,true) load 1333539-1.html
pref(dom.animations-api.core.enabled,true) load 1333539-2.html
pref(dom.animations-api.core.enabled,true) load 1334582-1.html
pref(dom.animations-api.core.enabled,true) load 1334583-1.html
pref(dom.animations-api.core.enabled,true) load 1335998-1.html
pref(dom.animations-api.core.enabled,true) load 1343589-1.html
Expand Down

0 comments on commit dccd6cb

Please sign in to comment.