Closed
Bug 582162
Opened 14 years ago
Closed 14 years ago
assignment needs to ignore the setter's result
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
People
(Reporter: luke, Assigned: luke)
Details
(Whiteboard: fixed-in-tracemonkey)
Attachments
(1 file)
(deleted),
patch
|
brendan
:
review+
|
Details | Diff | Splinter Review |
This was regressed by fatval which passes ®s.sp[x] instead of passing the address of a copy to setProperty.
Attachment #460437 -
Flags: review?(brendan)
Comment 1•14 years ago
|
||
Comment on attachment 460437 [details] [diff] [review]
fix
Whew! Thanks to adrake for noticing, Waldo for escalating, and Luke for patching. A trace-test is enough in my book but a purist might want an ecma_1 jsreftest.
/be
Attachment #460437 -
Flags: review?(brendan) → review+
Comment 2•14 years ago
|
||
This was covered (badly) by ACID3, before we optimized JSOP_LENGTH, Waldo says.
/be
Comment 3•14 years ago
|
||
In fairness to Acid3, I'm not sure there's any other property native to ECMAScript-262, 3rd ed. which has this sort of magical coerc-y behavior upon setting (and ES5 was out because of the self-imposed restriction to long-standardized functionality). From what I can tell only Array had a magical [[Put]] implementation which did anything other than set to the provided value. /a/.lastIndex comes close, but ES3 underspecified it enough that it's better the exact spec language wasn't lawyered into something convolutedly semi-self-consistent. The E4X examples here are out for obvious reasons. And ES5 getters and setters using either literal or programmatic syntax didn't even exist at that point in a standard, or their semantics were yet far from being worked out.
It hadn't occurred to me that length wasn't optimized when bug 312354 was fixed -- an example for people writing tests of why tests should address both general (some random property name, in concert with our then-extension-land setters) and specific cases (like length as Acid3 exercised) rather than the narrow bit suggested by a testcase.
Comment 4•14 years ago
|
||
Hah! if Hixie could test SMIL in Acid3, then E4X was fair game too.
Good point about generalized or wide-field-of-fire tests.
/be
Assignee | ||
Comment 5•14 years ago
|
||
Whiteboard: fixed-in-tracemonkey
Comment 6•14 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•