ariya/phantomjs — pull request #12307 by jgoz (2014-06-12 05:41:58+00:00)
Title: Use Array.prototype.slice in window.callPhantom

Fixes #12306.

`window.callPhantom` formerly used `Array.prototype.splice` for cloning its arguments to the internal `_phantom.call`. This relied on non-standard behaviour of the `splice` method when only a single argument was passed to it (it requires 2 arguments, as per the [spec](http://es5.github.io/#x15.4.4.12)).

The correct method for cloning the arguments array is to use `Array.prototype.slice`, which accepts a single argument (index) and returns a new array from the specified index.