Closed
Bug 356133
Opened 18 years ago
Closed 18 years ago
Incorrect uneval for ({'' setter: function(){}})
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
VERIFIED
FIXED
People
(Reporter: jruderman, Assigned: crowderbt)
References
Details
(Keywords: testcase)
Split from bug 356083 per crowder -- decompilation of object literals within functions and uneval of objects use completely separate code.
js> o = ({'' setter: function(){}})
[object Object]
js> c = uneval(o)
({set ''() {}})
js> eval(c)
typein:7: SyntaxError: missing : after property id:
typein:7: ({set ''() {}})
typein:7: ......^
Assignee | ||
Updated•18 years ago
|
Assignee: general → crowder
Assignee | ||
Updated•18 years ago
|
Status: NEW → ASSIGNED
OS: Mac OS X 10.4 → All
Hardware: Macintosh → All
Assignee | ||
Comment 1•18 years ago
|
||
I think the bug here is that o = ({'' setter: function() {}}) works, but please correct me if I am wrong.
Comment 2•18 years ago
|
||
The old setter: syntax (getter:) allows any property id (non-lexical-identifier ids must of course be quoted). That includes the empty string. This should still work, so the decompiler should simply produce the old syntax with proper quotes where needed.
/be
Assignee | ||
Comment 3•18 years ago
|
||
I actually changed my mind about this; I'd like to handle toSource/Decompiler bugs together for cases like this, because I think a future maintainer will be less confused by seeing these changes/fixed go together. Look at 356083 for the patch coming soon.
Depends on: 356083
Reporter | ||
Comment 4•18 years ago
|
||
WFM, probably fixed by one of Crowder's patches.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Flags: in-testsuite?
Resolution: --- → WORKSFORME
Comment 5•18 years ago
|
||
added test as part of js1_5/decompilation/regress-356083.js
Flags: in-testsuite? → in-testsuite+
Assignee | ||
Comment 6•18 years ago
|
||
This is specifically fixed by the patch in bug 356083 (as I mentioned here, I rolled the fixes into one patch. Thanks for the reminder, Jesse
Resolution: WORKSFORME → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•