Closed
Bug 1456973
Opened 6 years ago
Closed 6 years ago
Add explicit ToNumber in wrappedCompareFn in TypedArraySort
Categories
(Core :: JavaScript: Standard Library, defect, P2)
Core
JavaScript: Standard Library
Tracking
()
RESOLVED
FIXED
mozilla63
People
(Reporter: anba, Assigned: khyperia)
References
Details
Attachments
(1 file)
2.09 KB,
patch
|
jorendorff
:
review+
|
Details | Diff | Splinter Review |
https://searchfox.org/mozilla-central/rev/36dec78aecc40539ecc8d78e91612e38810f963c/js/src/builtin/TypedArray.js#1213 --- // Step a. var v = comparefn(x, y); --- should instead read: --- // Step a. var v = +comparefn(x, y); --- Test case: --- var ta = new Int32Array(4); var ab = ta.buffer; ta.sort(function(a, b) { print("COMPARE"); detachArrayBuffer(ab); return { [Symbol.toPrimitive]() { print("TO_PRIMITIVE"); } }; }); --- Expected: Prints "COMPARE" and "TO_PRIMITIVE" Actual: Prints only "COMPARE"
Updated•6 years ago
|
Priority: -- → P1
Updated•6 years ago
|
status-firefox62:
--- → affected
Priority: P1 → P2
Assignee | ||
Comment 1•6 years ago
|
||
Assignee | ||
Updated•6 years ago
|
Assignee: nobody → khyperia
Status: NEW → ASSIGNED
Assignee | ||
Updated•6 years ago
|
Attachment #9002825 -
Flags: review?(jdemooij)
Comment 2•6 years ago
|
||
Comment on attachment 9002825 [details] [diff] [review] Add explicit ToNumber in wrappedCompareFn in TypedArraySort. Review of attachment 9002825 [details] [diff] [review]: ----------------------------------------------------------------- Stealing review. r=me, but this test belongs in test262. Now is a good time to figure out js/src/tests/test262-export.py.
Attachment #9002825 -
Flags: review?(jdemooij) → review+
Assignee | ||
Updated•6 years ago
|
Keywords: checkin-needed
Pushed by csabou@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/4e65beb5c226 Add explicit ToNumber in wrappedCompareFn in TypedArraySort. r=jorendorff
Keywords: checkin-needed
Comment 4•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/4e65beb5c226
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
status-firefox63:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
Updated•6 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•