Closed
Bug 668936
Opened 13 years ago
Closed 13 years ago
Arguments to String.prototype.replace not stringified in correct order
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla8
People
(Reporter: Waldo, Assigned: paul.biggar)
References
(Blocks 1 open bug, )
Details
Attachments
(1 file)
(deleted),
patch
|
Waldo
:
review+
|
Details | Diff | Splinter Review |
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•13 years ago
|
Assignee: general → pbiggar
Assignee | ||
Comment 1•13 years ago
|
||
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)
Reporter | ||
Comment 2•13 years ago
|
||
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+
Comment 3•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla8
Comment 4•13 years ago
|
||
Is the idea to import all of test262 somehow, are should someone add the test in $URL?
Flags: in-testsuite?
Assignee | ||
Comment 5•13 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.
Description
•