Closed Bug 155289 Opened 22 years ago Closed 22 years ago

String.prototype.XXX.length has some wrong values

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
minor

Tracking

()

VERIFIED FIXED

People

(Reporter: rogerl, Assigned: rogerl)

References

Details

(Keywords: js1.5)

Attachments

(1 file)

>String.prototype.indexOf.length 2 <--- should be 1 (ECMA 15.5.4.7) >String.prototype.lastIndexOf.length 2 <--- should be 1 (ECMA 15.5.4.8) >String.prototype.split.length 1 <--- should be 2 (ECMA 15.5.4.14) Note: the wrong values are supported by the test suite.
Test numbers are: Testcase ecma/String/15.5.4.6-2.js failed Failure messages were: String.prototype.indexOf.length = 1 FAILED! expected: 2 String.prototype.indexOf.length = null; String.prototype.indexOf.length = 1 FAILED! expected: 2 delete String.prototype.indexOf.length; String.prototype.indexOf.length = 1 FAILED! expected: 2 Testcase ecma/String/15.5.4.7-2.js failed Failure messages were: String.prototype.lastIndexOf.length = 1 FAILED! expected: 2 delete String.prototype.lastIndexOf.length; String.prototype.lastIndexOf.length = 1 FAILED! expected: 2 Testcase ecma/String/15.5.4.8-1.js failed Failure messages were: String.prototype.split.length = 2 FAILED! expected: 1 delete String.prototype.split.length; String.prototype.split.length = 2 FAILED! expected: 1
Blocks: 149801
cc'ing reviewers; adding js1.5 keyword; adding as dependency to bug 149801 -
Keywords: js1.5
Comment on attachment 89948 [details] [diff] [review] Fix length values sr=brendan@mozilla.org -- khanson, can you r= soon? Or anyone who is cc'd, if Kenton is on vacation (as I recall)? /be
Attachment #89948 - Flags: superreview+
Comment on attachment 89948 [details] [diff] [review] Fix length values r=khanson. Brendan could you sr= bug 145779, it is very similar to this patch. Thanks, Kenton
Attachment #89948 - Flags: review+
Note rogerl is on vacation until July 8. I think we want this for the 1.0 branch, too, right?
Comment on attachment 89948 [details] [diff] [review] Fix length values a=chofmann for 1.0.1
Attachment #89948 - Flags: approval+
Fixed in branch and trunk. /be
Status: NEW → RESOLVED
Closed: 22 years ago
Keywords: fixed1.0.1
Resolution: --- → FIXED
Verified FIXED. All three testcases above corrected: mozilla/js/tests/ecma/String/15.5.4.6-2.js mozilla/js/tests/ecma/String/15.5.4.7-2.js mozilla/js/tests/ecma/String/15.5.4.8-1.js These tests now pass in the debug/optimized JS shells, and 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
Flags: testcase+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: