Some unexpected behavior during working with __proto__ property in JavaScriptCore. I did not reproduced in WebKit. var f = function () {}; debug(f.__proto__.a); // undefined; f.__proto__.a = 10;// TypeError: undefined is not an object debug(f.__proto__ === Function.prototype); //true Function.prototype.a = 10; //OK debug(Function.prototype.a); // 10 debug(f.__proto__.a); // 10 var boo = function () { var foo = function (); foo.__proto__.b = 10; return foo.__proto__.b; }; debug(boo()); var g = function () { f.__proto__.b = 101; }; g(); debug(f.__proto__.b); // 10
Possible somehow related to the https://bugs.webkit.org/attachment.cgi?id=270008&action=review
Not sure. Can you try to see if this works before that revision? This behavior does indeed seem weird.
It seems it was my broken build