2.1.48 [ECMA-262/7] Section Array.prototype.sort (comparefn)

V0205: Array.prototype.sort uses ToUint32() for length conversion

The specification states: Array.prototype.sort (comparefn)
     The elements of this array are sorted. The sort is not necessarily stable (that is, 
     elements that compare equal do not necessarily remain in their original order). If 
     comparefn is not undefined, it should be a function that accepts two arguments x and 
     y and returns a negative value if x < y, zero if x = y, or a positive value if x > y.
     Upon entry, the following steps are performed to initialize evaluation of the sort 
         1. [2018 spec only] If comparefn is not undefined and IsCallable(comparefn) is 
            false, throw a TypeError exception. 
         ... Let obj be ? ToObject(this value).
         ... Let len be ? ToLength(? Get(obj, "length")).

EdgeHTML Mode

Array.prototype.sort uses ToUint32() rather than ToLength() for length conversion:

    ... Let obj be ToObject(this value).

    ... Let len be ? ToUint32(? Get(obj, "length")).