Bug 1015794 - use Object.create to create services timer objects. r=rnewman

This commit is contained in:
Mark Hammond 2014-06-12 10:06:47 +10:00
parent d601678fcc
commit cb33929743

View File

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