Bug 1015794 - avoid mutating the prototype of a timer object to prevent warnings. r=rnewman

This commit is contained in:
Mark Hammond 2014-05-28 09:54:52 +10:00
parent 73f70065a1
commit ac6fb3ba21

View File

@ -166,8 +166,9 @@ this.CommonUtils = {
} }
// Create a special timer that we can add extra properties // Create a special timer that we can add extra properties
let timer = {}; let timer = {
timer.__proto__ = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer); __proto__: Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer),
};
// Provide an easy way to clear out the timer // Provide an easy way to clear out the timer
timer.clear = function() { timer.clear = function() {