Bug 173321

Summary: DFG doesn't properly handle a property that is change to read only in a prototype
Product: WebKit Reporter: Michael Saboff <msaboff>
Component: JavaScriptCoreAssignee: Michael Saboff <msaboff>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, buildbot, fpizlo, keith_miller, mark.lam, saam
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch fpizlo: review+

Michael Saboff
Reported 2017-06-13 12:47:07 PDT
Consider the code: var SimpleObject = function () { this.a = 0; this.b = 1; this.c = 2; } var proto = { p: 100 }; SimpleObject.prototype = proto; var test = function () { var o = new SimpleObject(); o.x = 10; o.y = 11; return o; } The results of calling test() is an object like: { a: 0, b: 1, c: 2, p: 100, x: 10, y: 11 } If you then call Object.defineProperty(proto, "a", { value: 101, writable: false }); The results of calling test() should be an object like: { a: 101, b: 1, c: 2, p: 100, x: 10, y: 11 } The DFG doesn't check for the ReadOnly case and therefore doesn't reflect the change in prototype.
Attachments
Patch (5.23 KB, patch)
2017-06-13 14:23 PDT, Michael Saboff
fpizlo: review+
Michael Saboff
Comment 1 2017-06-13 14:23:00 PDT
Michael Saboff
Comment 2 2017-06-13 14:23:21 PDT
Michael Saboff
Comment 3 2017-06-13 14:52:08 PDT
Michael Saboff
Comment 4 2017-06-13 15:42:42 PDT
*** Bug 162567 has been marked as a duplicate of this bug. ***
Note You need to log in before you can comment on or make changes to this bug.