From dccd6cb215d42dfa4c8328e834ebfae9f40e958e Mon Sep 17 00:00:00 2001 From: Hiroyuki Ikezoe Date: Tue, 12 Sep 2017 08:42:45 +0900 Subject: [PATCH] Bug 1334582 - Use UINT64_MAX instead of IsInfinite() for checking whether TimingParans.mIterations is infinite or not. r=boris Because our ComputedTiming.mCurrentIteration is uint64_t. MozReview-Commit-ID: FjbhEvTUMr4 --- dom/animation/AnimationEffectReadOnly.cpp | 2 +- dom/animation/test/crashtests/1334582-1.html | 11 +++++++++++ dom/animation/test/crashtests/crashtests.list | 1 + 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 dom/animation/test/crashtests/1334582-1.html diff --git a/dom/animation/AnimationEffectReadOnly.cpp b/dom/animation/AnimationEffectReadOnly.cpp index b69c9d10b711..6a06a7e45902 100644 --- a/dom/animation/AnimationEffectReadOnly.cpp +++ b/dom/animation/AnimationEffectReadOnly.cpp @@ -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 diff --git a/dom/animation/test/crashtests/1334582-1.html b/dom/animation/test/crashtests/1334582-1.html new file mode 100644 index 000000000000..d67ddc3c5205 --- /dev/null +++ b/dom/animation/test/crashtests/1334582-1.html @@ -0,0 +1,11 @@ + + + + + + + diff --git a/dom/animation/test/crashtests/crashtests.list b/dom/animation/test/crashtests/crashtests.list index b37a573dbf74..75cdbb941986 100644 --- a/dom/animation/test/crashtests/crashtests.list +++ b/dom/animation/test/crashtests/crashtests.list @@ -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