The default bug view has changed. See this FAQ.

Arguments to String.prototype.replace not stringified in correct order

RESOLVED FIXED in mozilla8

Status

()

Core
JavaScript Engine
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: Waldo, Assigned: Paul Biggar)

Tracking

(Blocks: 1 bug)

unspecified
mozilla8
Points:
---
Bug Flags:
in-testsuite ?

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

S15.5.4.11_A1_T11	Call replace (searchValue, replaceValue) function with objects arguments of string object. Objects have overrided toString function, that throw exception	fail
S15.5.4.11_A1_T12	Call replace (searchValue, replaceValue) function with objects arguments of String object.	fail
(Assignee)

Updated

6 years ago
Assignee: general → pbiggar
(Assignee)

Comment 1

6 years ago
Created attachment 550773 [details] [diff] [review]
move ToString(search) above Tostring(replace)

This just moves the ToString call on search above the ToString call on replace. Fixes both test cases, no new failures.
Attachment #550773 - Flags: review?(jwalden+bmo)
Comment on attachment 550773 [details] [diff] [review]
move ToString(search) above Tostring(replace)

Review of attachment 550773 [details] [diff] [review]:
-----------------------------------------------------------------

It's not clear to me that the spec algorithm actually requires this.  Ideally the spec algorithm would be a stepwise algorithm like all the others, at least to some extent, and would make any requirement about this explicit.  Maybe if I find myself bored someday I'll write one up.

On the other hand, it's no skin off our nose to do this even if it's not strictly required, so whatever -- let's pick up the points.
Attachment #550773 - Flags: review?(jwalden+bmo) → review+
http://hg.mozilla.org/mozilla-central/rev/1e7cabf5103d
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla8
Is the idea to import all of test262 somehow, are should someone add the test in $URL?
Flags: in-testsuite?
(Assignee)

Comment 5

6 years ago
(In reply to Ms2ger from comment #4)
> Is the idea to import all of test262 somehow, are should someone add the
> test in $URL?

The former. See bug 669766.
You need to log in before you can comment on or make changes to this bug.