WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
15927
REGRESSION(
r27487
): delete a.c followed by __defineGetter__("c", ...) incorrectly deletes another property
https://bugs.webkit.org/show_bug.cgi?id=15927
Summary
REGRESSION(r27487): delete a.c followed by __defineGetter__("c", ...) incorre...
Khoo Yit Phang
Reported
2007-11-09 15:32:51 PST
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?
Attachments
Test case
(1.18 KB, application/xhtml+xml)
2007-11-09 15:34 PST
,
Khoo Yit Phang
no flags
Details
Working test case
(1.10 KB, text/html)
2007-11-10 03:55 PST
,
Mark Rowe (bdash)
no flags
Details
Test case in a testkjs-friendly form
(370 bytes, text/plain)
2007-11-10 04:43 PST
,
Mark Rowe (bdash)
no flags
Details
patch
(4.82 KB, patch)
2007-11-10 12:14 PST
,
Darin Adler
sam
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Khoo Yit Phang
Comment 1
2007-11-09 15:34:21 PST
Created
attachment 17163
[details]
Test case
Mark Rowe (bdash)
Comment 2
2007-11-10 03:55:28 PST
Created
attachment 17169
[details]
Working test case The test case provided throws a JavaScript exception. I've attached a fixed version that demonstrates the issue.
Mark Rowe (bdash)
Comment 3
2007-11-10 03:56:11 PST
This is a regression from WebKit in Leopard.
Mark Rowe (bdash)
Comment 4
2007-11-10 04:42:20 PST
"git bisect" narrowed this down to regressing in
r27487
(
http://trac.webkit.org/projects/webkit/changeset/27487
). Running with hashtable consistency checks on does not turn up anything useful. CC'ing Darin as he was responsible for the change that introduced this regression.
Mark Rowe (bdash)
Comment 5
2007-11-10 04:43:40 PST
Created
attachment 17171
[details]
Test case in a testkjs-friendly form This is the same test case in a testkjs-friendly form. It also prints out a handy SUCCESS or FAIL at the end.
Darin Adler
Comment 6
2007-11-10 12:14:20 PST
Created
attachment 17173
[details]
patch
Sam Weinig
Comment 7
2007-11-10 16:11:10 PST
Comment on
attachment 17173
[details]
patch r=me. Are we considering 4k large these days?
Darin Adler
Comment 8
2007-11-10 17:10:44 PST
Committed revision 27678.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug