Closed
Bug 155285
Opened 22 years ago
Closed 22 years ago
Array.join(undefined) should use ','
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
VERIFIED
FIXED
People
(Reporter: rogerl, Assigned: rogerl)
References
Details
(Keywords: js1.5)
Attachments
(1 file, 1 obsolete file)
506 bytes,
patch
|
brendan
:
review+
brendan
:
superreview+
chofmann
:
approval+
|
Details | Diff | Splinter Review |
Try:
>a = [1,2]
>a.join(undefined)
1undefined2
Should be:
1,2
(ECMA 15.4.4.5, step 3)
Assignee | ||
Comment 1•22 years ago
|
||
Test suite expects 'undefined': Testcase ecma/Array/15.4.4.3-1.js failed var TEST_ARRAY = new Array(null, void 0, true, false, 123, new Object(), new Boolean(true) ); TEST_ARRAY.join(void 0) = ,,true,false,123,[object Object],true FAILED! expected: undefinedundefinedtrueundefinedfalseundefined123undefined[object Object]undefinedtrue
Assignee | ||
Comment 2•22 years ago
|
||
Comment 3•22 years ago
|
||
Comment on attachment 89953 [details] [diff] [review] Test for undefined value in argv[0] >- if (argc == 0) >+ if (argc == 0 || JSVAL_IS_VOID(argv[0])) Shouldn't this just be if (JSVAL_IS_VOID(argv[0])) ??? (Unspecified args with positions < function.length have value JSVAL_VOID in the argv[] array, so that if argc is zero then argv[0] is JSVAL_VOID, since Array.join.length is 1.) --scole
Assignee | ||
Comment 4•22 years ago
|
||
I'll buy that. Thanks.
Attachment #89953 -
Attachment is obsolete: true
Comment 5•22 years ago
|
||
cc'ing reviewers; adding js1.5 keyword; adding as dependency to bug 149801 -
Keywords: js1.5
Comment 6•22 years ago
|
||
Comment on attachment 89973 [details] [diff] [review] Removed argc test sr=brendan@mozilla.org, and I say scole already did a bang-up r= job. Roger, can you get this into the trunk and mail drivers asking for branch approval? Thanks, /be
Attachment #89973 -
Flags: superreview+
Attachment #89973 -
Flags: review+
Assignee | ||
Comment 7•22 years ago
|
||
Fix checked in to trunk. Mailing drivers (but I'm on vacation thru Friday so someone else will have to check it in if it gets approval).
Keywords: mozilla1.0.1
Comment 8•22 years ago
|
||
Comment on attachment 89973 [details] [diff] [review] Removed argc test a=chofmann for 1.0.1 add fixed1.0.1 keyword after checking in on the branch
Comment 9•22 years ago
|
||
Comment on attachment 89973 [details] [diff] [review] Removed argc test a=chofmann for 1.0.1 add fixed1.0.1 keyword after checking in on the branch
Attachment #89973 -
Flags: approval+
Comment 11•22 years ago
|
||
Fixed on the branch, too. /be
Status: NEW → RESOLVED
Closed: 22 years ago
Keywords: mozilla1.0.1+ → fixed1.0.1
Resolution: --- → FIXED
Comment 12•22 years ago
|
||
Verified FIXED. Testcase corrected: mozilla/js/tests/ecma/Array/15.4.4.3-1.js This now passes in the debug/optimized JS shells. It also passes in the rhino/rhinoi shells, since Roger also made the fix there. Also fixed on MOZILLA_1_0_BRANCH; adding verified1.0.1 keyword -
Status: RESOLVED → VERIFIED
Keywords: verified1.0.1
Updated•19 years ago
|
Flags: testcase+
You need to log in
before you can comment on or make changes to this bug.
Description
•