Closed
Bug 301204
Opened 19 years ago
Closed 19 years ago
Array.reverse() is broken
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: bugs.caleb, Assigned: mrbkap)
References
Details
(Keywords: js1.5, regression)
Attachments
(1 file)
3.19 KB,
patch
|
shaver
:
review+
benjamin
:
approval1.8b4+
|
Details | Diff | Splinter Review |
The Array.reverse() function is not working properly. Reproduction steps: 1. Open up the JS console 2. Eval: var myArray = new Array("one", "two", "three"); myArray.reverse(); The expected output is: three,two,one Actual output is: one,two,one Possible regressor is bug 299738.
Updated•19 years ago
|
Assignee: js-console → general
QA Contact: jrgmorrison → general
Updated•19 years ago
|
Flags: blocking1.8b4?
Updated•19 years ago
|
Assignee | ||
Comment 2•19 years ago
|
||
I have a fix for this particular bug and am tracking down other regressions the js testsuite is pointing out.
Status: NEW → ASSIGNED
Target Milestone: mozilla1.8beta4 → ---
Assignee | ||
Comment 3•19 years ago
|
||
Reverse needed to grab both values before it started doing the swapping (duh!). Slice needed to protect against begin > end because the setlength call was depending on it (this wasn't a problem before because we didn't call setlength, and instead relied on OBJ_SET_PROPERTY, which we can no longer do). The JS testsuite (the tests in */Array/*, anyway) tell me that the only other array bugs are known and open.
Attachment #189688 -
Flags: review?(shaver)
Comment on attachment 189688 [details] [diff] [review] Duh r=shaver, requesting a. This has coverage in the test suite already, it looks like.
Attachment #189688 -
Flags: review?(shaver)
Attachment #189688 -
Flags: review+
Attachment #189688 -
Flags: approval1.8b4?
Updated•19 years ago
|
Attachment #189688 -
Flags: approval1.8b4? → approval1.8b4+
Assignee | ||
Comment 5•19 years ago
|
||
Fix checked in, sorry for the regression.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Hmm, did this bug cause an increased leakage? Here are the checkins: http://tinderbox.mozilla.org/bonsai/cvsquery.cgi?module=PhoenixTinderbox&date=explicit&mindate=1121711760&maxdate=1121715719 From: RLk:4.98KB Lk:300KB MH:7.67MB A:214K To: RLk:5.02KB <--- Lk:299KB MH:7.66MB A:214K
Updated•19 years ago
|
Flags: blocking1.8b4?
Updated•19 years ago
|
Flags: testcase+
You need to log in
before you can comment on or make changes to this bug.
Description
•