From ac6fb3ba21e97a0452698d3a65c6532d9371a1de Mon Sep 17 00:00:00 2001 From: Mark Hammond Date: Wed, 28 May 2014 09:54:52 +1000 Subject: [PATCH] Bug 1015794 - avoid mutating the prototype of a timer object to prevent warnings. r=rnewman --- services/common/utils.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/services/common/utils.js b/services/common/utils.js index 61c050d0212..a5c7a4c08a0 100644 --- a/services/common/utils.js +++ b/services/common/utils.js @@ -166,8 +166,9 @@ this.CommonUtils = { } // Create a special timer that we can add extra properties - let timer = {}; - timer.__proto__ = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer); + let timer = { + __proto__: Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer), + }; // Provide an easy way to clear out the timer timer.clear = function() {