archives

« Bugzilla Issues Index

#3141 — 22.1.3.24 Array.prototype.sort: Description of argument types for SortCompare


22.1.3.24 Array.prototype.sort (comparefn)

In the "Otherwise, the following steps are taken" part:

> [...] where the arguments for calls to SortCompare are results of
> previous calls to the [[Get]] internal method.

But SortCompare takes property keys as arguments, not results from previous [[Get]] operations.

There are some recent proposals to change SortCompare to use values instead of property keys [1, 2], so basically reverting the changes from the 3rd edition. If SortCompare gets reverted to use values, this bug report can be closed for the 6th edition resp. converted to 5th edition for a future errata. IOW the mismatched description is an issue since the 3rd edition.


[1] bug 3089
[2] https://mail.mozilla.org/pipermail/es-discuss/2014-August/038847.html


fixed in rev27 editor's draft

Cloned Bug 3143 for ES5.1 issue


fixed in rev27 draft