Bug 1453385 - Fix typo to prevent passing Infinity to protocol.js. r=jryans draft
authorAlexandre Poirot <poirot.alex@gmail.com>
Wed, 11 Apr 2018 09:08:19 -0700
changeset 781940 b0709b05690ca59c34c9bbb76f12a370c4660862
parent 781939 997159e65ef2828d1259fa8003c332e0252e5114
child 781941 49b570f02f1d2bd7d4eccd2fd8e691be83524fe8
push id106451
push userbmo:poirot.alex@gmail.com
push dateFri, 13 Apr 2018 20:48:33 +0000
reviewersjryans
bugs1453385
milestone61.0a1
Bug 1453385 - Fix typo to prevent passing Infinity to protocol.js. r=jryans `Infinity` object can't be serialized via structuredclone and so actors should not communicate such object. Fix this code which meant to prevent that. MozReview-Commit-ID: 3TpldcSE88F
devtools/server/actors/animation.js
--- a/devtools/server/actors/animation.js
+++ b/devtools/server/actors/animation.js
@@ -220,17 +220,17 @@ var AnimationPlayerActor = protocol.Acto
   /**
    * Get the animation iteration count for this player. That is, how many times
    * is the animation scheduled to run.
    * @return {Number} The number of iterations, or null if the animation repeats
    * infinitely.
    */
   getIterationCount: function() {
     let iterations = this.player.effect.getComputedTiming().iterations;
-    return iterations === "Infinity" ? null : iterations;
+    return iterations === Infinity ? null : iterations;
   },
 
   /**
    * Get the animation iterationStart from this player, in ratio.
    * That is offset of starting position of the animation.
    * @return {Number}
    */
   getIterationStart: function() {