--- fulljslint.js 2008-10-20 17:26:56.048664000 +0100 +++ fulljslint-djc.js 2008-10-20 17:30:59.097094500 +0100 @@ -711,7 +711,7 @@ Object.prototype.union = function (o) { var n; for (n in o) { - if (o.hasOwnProperty(n)) { + if ({}.hasOwnProperty.call(o, n)) { this[n] = o[n]; } } @@ -881,7 +881,7 @@ if (type === '(color)') { t = {type: type}; } else if (type === '(punctuator)' || - (type === '(identifier)' && syntax.hasOwnProperty(value))) { + (type === '(identifier)' && {}.hasOwnProperty.call(syntax, value))) { t = syntax[value]; // Mozilla bug workaround. @@ -1511,16 +1511,13 @@ function addlabel(t, type) { - if (t === 'hasOwnProperty') { - error("'hasOwnProperty' is a really bad name."); - } if (option.safe && funct['(global)']) { warning('ADsafe global: ' + t + '.', token); } // Define t in the current function in the current scope. - if (funct.hasOwnProperty(t)) { + if ({}.hasOwnProperty.call(funct, t)) { warning(funct[t] === true ? "'{a}' was used before it was defined." : "'{a}' is already defined.", @@ -1531,7 +1528,7 @@ scope[t] = funct; } else if (funct['(global)']) { global[t] = funct; - if (implied.hasOwnProperty(t)) { + if ({}.hasOwnProperty.call(implied, t)) { warning("'{a}' was used before it was defined.", nexttoken, t); delete implied[t]; } @@ -2755,7 +2752,7 @@ warning("Excepted a style attribute, and instead saw '{a}'.", nexttoken, nexttoken.value); } else { - if (cssAttributeData.hasOwnProperty(nexttoken.value)) { + if ({}.hasOwnProperty.call(cssAttributeData, nexttoken.value)) { v = cssAttributeData[nexttoken.value]; } else { v = cssAny; @@ -2894,7 +2891,7 @@ } for (;;) { if (nexttoken.identifier) { - if (!htmltag.hasOwnProperty(nexttoken.value)) { + if (!{}.hasOwnProperty.call(htmltag, nexttoken.value)) { warning("Expected a tagName, and instead saw {a}.", nexttoken, nexttoken.value); } @@ -2905,7 +2902,7 @@ case '+': advance(); if (!nexttoken.identifier || - !htmltag.hasOwnProperty(nexttoken.value)) { + !{}.hasOwnProperty.call(htmltag, nexttoken.value)) { warning("Expected a tagName, and instead saw {a}.", nexttoken, nexttoken.value); } @@ -3252,7 +3249,7 @@ } a = a.toLowerCase(); xquote = ''; - if (attributes.hasOwnProperty(a)) { + if ({}.hasOwnProperty.call(attributes, a)) { warning("Attribute '{a}' repeated.", nexttoken, a); } if (a.slice(0, 2) === 'on') { @@ -4648,7 +4645,7 @@ function to_array(o) { var a = [], k; for (k in o) { - if (o.hasOwnProperty(k)) { + if ({}.hasOwnProperty.call(o, k)) { a.push(k); } } @@ -4732,7 +4729,7 @@ gl = []; la = []; for (k in f) { - if (f.hasOwnProperty(k) && k.charAt(0) !== '(') { + if ({}.hasOwnProperty.call(f, k) && k.charAt(0) !== '(') { v = f[k]; switch (v) { case 'closure': @@ -4802,4 +4799,4 @@ return itself; -}(); \ No newline at end of file +}();