Bug 161579 - Add property to __proto__ lead to TypeError.
Summary: Add property to __proto__ lead to TypeError.
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-04 11:46 PDT by GSkachkov
Modified: 2016-09-12 03:11 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description GSkachkov 2016-09-04 11:46:42 PDT
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
Comment 1 GSkachkov 2016-09-04 11:47:25 PDT
Possible somehow related to the https://bugs.webkit.org/attachment.cgi?id=270008&action=review
Comment 2 Saam Barati 2016-09-11 23:42:15 PDT
Not sure. Can you try to see if this works before that revision? This behavior does indeed seem weird.
Comment 3 GSkachkov 2016-09-12 03:11:55 PDT
It seems it was my broken build