[Webkit-unassigned] [Bug 161579] New: Add property to __proto__ lead to TypeError.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Sep 4 11:46:42 PDT 2016


https://bugs.webkit.org/show_bug.cgi?id=161579

            Bug ID: 161579
           Summary: Add property to __proto__ lead to TypeError.
    Classification: Unclassified
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: gskachkov at gmail.com

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

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160904/4ff83b4b/attachment.html>


More information about the webkit-unassigned mailing list