mozilla/rhino — pull request #73 by anba (2012-07-29 15:22:37+00:00)
Title: Patch for Bug 728286

Not-defined and undefined elements are sorted to the end, cf. Array.prototype.sort [15.4.4.11] the SortCompare abstract operation steps 3-12. The previous implementation had two bugs:
- same references (per Java == operator) were never compared
- not-defined and undefined elements were treated as equal elements, although not-defined elements must appear after undefined elements in the sorted array