[Webkit-unassigned] [Bug 15927] New: delete a.c followed by __defineGetter__("c", ...) incorrectly deletes another property

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Nov 9 15:32:51 PST 2007


http://bugs.webkit.org/show_bug.cgi?id=15927

           Summary: delete a.c followed by __defineGetter__("c", ...)
                    incorrectly deletes another property
           Product: WebKit
           Version: 525+ (Nightly build)
          Platform: Macintosh
        OS/Version: Mac OS X 10.4
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: khooyp at cs.umd.edu


When a property is deleted, and a getter/setter of the same name is create,
another unrelated property will be deleted as well:

    var obj = { a:1, b:2, c:3, d:4, e:5 }
    delete obj.c;
    obj.__defineGetter__("c", function() { return 3 });
    /* obj.e will be deleted!*/

My testing seems to indicate that the latest-defined property is the one that
gets deleted; mistakenly replaced by the getter/setter perhaps?


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



More information about the webkit-unassigned mailing list