Bug 547827 - JavaScript strict warning: modules/util.js, line 617: reference to undefined property thisObj[name] [r=Mardak]

Check that name is a property of thisObj before trying to access it.
This commit is contained in:
Paul O’Shannessy 2010-02-23 13:10:32 -08:00
parent f39831ac01
commit b5463708b7

View File

@ -614,7 +614,7 @@ let Utils = {
thisObj = thisObj || {};
// Delay an existing timer if it exists
if (thisObj[name] instanceof Ci.nsITimer) {
if (name in thisObj && thisObj[name] instanceof Ci.nsITimer) {
thisObj[name].delay = wait;
return;
}