You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What steps will reproduce the problem?
1. Use Box2D.js latest browsers Chrome or Firefox (these browsers support
Object.defineProperty with full specification.
2. From javascript console type:
>> var obj = new Object();
>> Object.defineProperty(obj, "color", {value:'red'})
>> console.log(obj.color); => undefined
The output should be 'red' because these browsers support ecmascript-5
THE LINE OF BUG IS:
"Object.prototype.defineProperty instanceof Function"
THAT LINE SHOULD BE:
"Object.defineProperty instanceof Function"
WHY BUG?
to check if browser support defineProperty
if(!(Object.defineProperty instanceof Function))
HERE IS THE FULL BUG IN SOURCE CODE
if(!(Object.prototype.defineProperty instanceof Function)
&& Object.prototype.__defineGetter__ instanceof Function
&& Object.prototype.__defineSetter__ instanceof Function)
{
Object.defineProperty = function(obj, p, cfg) {
if(cfg.get instanceof Function)
obj.__defineGetter__(p, cfg.get);
if(cfg.set instanceof Function)
obj.__defineSetter__(p, cfg.set);
}
}
Original issue reported on code.google.com by damp...@gmail.com on 27 Mar 2013 at 6:53
The text was updated successfully, but these errors were encountered:
This sucked away an entire afternoon truing to hook up QUnit. It uses
String.localeCompare(). This bug causes that function to raise an "Illegal
access" exception. Very hard to debug.
Original comment by dave.spr...@gmail.com on 24 Mar 2014 at 12:48
Original issue reported on code.google.com by
damp...@gmail.com
on 27 Mar 2013 at 6:53The text was updated successfully, but these errors were encountered: