[Webkit-unassigned] [Bug 33053] New: JSON.stringify implementation needlessly processes properties in the prototype chain

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Dec 30 06:58:15 PST 2009


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

           Summary: JSON.stringify implementation needlessly processes
                    properties in the prototype chain
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Keywords: ES5
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: kent.hansen at nokia.com


ES5 section 15.12.3, abstract Operation JO(value), step 6:  "Let K be an
internal List of Strings consisting of the names of all the own properties of
value [...]".
The JavaScriptCore implementation is calling JSObject::getPropertyNames(),
whereas it could be calling JSObject::getOwnPropertyNames() instead.

Making this change does not affect the final output (the prototype-inherited
properties are ignored anyways, since getOwnPropertySlot() subsequently returns
false for them), but could make the implementation faster and use less memory.

-- 
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