Overview ======== According to section 15.3.4.3 of the spec, `Function.prototype.apply` should accept an array-like object as its second argument. See steps 2 and 3: > 2. If Type(argArray) is not Object, then throw a TypeError exception. > 3. Let len be the result of calling the [[Get]] internal method of argArray with argument "length". As of the latest WebKit nightly, invocations such as `(function(){}).apply(null, {length: 0})` throw a `TypeError`. This is inconsistent with the above algorithm. Steps to Reproduce ================== 1) Open the Web Inspector. 2) Enter `(function(){ return [].slice.call(arguments); }).apply(null, {0: 1, 1: 2, length: 2})`. Actual Results ============== A `TypeError` is thrown. Expected Results ================ The function should return `[1, 2]`.
Created attachment 101618 [details] The patch
Fixed in r91482
Ooops, r91483