[Webkit-unassigned] [Bug 132872] New: Getter on prototype is called even though property is also defined on instance

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue May 13 10:29:40 PDT 2014


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

           Summary: Getter on prototype is called even though property is
                    also defined on instance
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Macintosh Intel
        OS/Version: Mac OS X 10.9
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: sebastian at adblockplus.org


If you define a getter on the prototype and cache its value by defining a property with the same name on the instance, sometimes the getter is called a second time, when the property is accessed. This can be reproduced on Safari 7.0.3 with the attached HTML page. A "TypeError: Attempting to change value of a readonly property" is thrown when the getter is called the second time and calls Object.defineProperty() again. The expected behavior would be that the getter is executed only once per instance.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list