Bug 1480027 - Part 1: Ignores animations that have overflowed delay or endDelay. r=gl
authorDaisuke Akatsuka <dakatsuka@mozilla.com>
Wed, 08 Aug 2018 12:46:45 +0900
changeset 430909 a90a87e41d896b87cf0af4c3b0492ca2fda704bf
parent 430908 0d58330c8fbc730be0ea41f70e7db04e9b7ae2cf
child 430910 3f8ddc26081f5052c6042db3253a15d80e2c46ff
push id106299
push userdakatsuka@mozilla.com
push dateFri, 10 Aug 2018 04:59:26 +0000
treeherdermozilla-inbound@3f8ddc26081f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgl
bugs1480027
milestone63.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1480027 - Part 1: Ignores animations that have overflowed delay or endDelay. r=gl Differential Revision: https://phabricator.services.mozilla.com/D2913
devtools/client/inspector/animation/animation.js
--- a/devtools/client/inspector/animation/animation.js
+++ b/devtools/client/inspector/animation/animation.js
@@ -657,16 +657,24 @@ class AnimationInspector {
   updateState(animations) {
     // Animation inspector already destroyed
     if (!this.inspector) {
       return;
     }
 
     this.stopAnimationsCurrentTimeTimer();
 
+    // Although it is not possible to set a delay or end delay of infinity using
+    // the animation API, if the value passed exceeds the limit of our internal
+    // representation of times, it will be treated as infinity. Rather than
+    // adding special case code to represent this very rare case, we simply omit
+    // such animations from the graph.
+    animations = animations.filter(anim => anim.state.delay !== Infinity &&
+                                           anim.state.endDelay !== Infinity);
+
     this.inspector.store.dispatch(updateAnimations(animations));
 
     if (hasRunningAnimation(animations)) {
       this.startAnimationsCurrentTimeTimer();
     } else {
       // Even no running animations, update the current time once
       // so as to show the state.
       this.onCurrentTimeTimerUpdated(this.state.timeScale.getCurrentTime());