| Index: test/webkit/dfg-call-function-hit-watchpoint.js
|
| diff --git a/test/webkit/concat-while-having-a-bad-time.js b/test/webkit/dfg-call-function-hit-watchpoint.js
|
| similarity index 78%
|
| copy from test/webkit/concat-while-having-a-bad-time.js
|
| copy to test/webkit/dfg-call-function-hit-watchpoint.js
|
| index dfda1e08a0b36194b787a44ee12a9693acd8aeaf..5a332c19f89ee11657cde3cbd8595c9b7ba1d78e 100644
|
| --- a/test/webkit/concat-while-having-a-bad-time.js
|
| +++ b/test/webkit/dfg-call-function-hit-watchpoint.js
|
| @@ -22,10 +22,25 @@
|
| // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
| description(
|
| -"Tests the behavior of Array.prototype.concat while the array is having a bad time due to one of the elements we are concatenating."
|
| +"Tests correctness of function calls when the function is overwritten."
|
| );
|
|
|
| -Object.defineProperty(Array.prototype, 0, { writable: false });
|
| -shouldBe("[42].concat()", "[42]");
|
| +function foo(a, b) {
|
| + return a + b;
|
| +}
|
|
|
| +function bar(a, b) {
|
| + return foo(a, b);
|
| +}
|
| +
|
| +for (var i = 0; i < 200; ++i) {
|
| + if (i == 150)
|
| + foo = function(a, b) { return a - b; }
|
| + var expected;
|
| + if (i < 150)
|
| + expected = i + i + 1;
|
| + else
|
| + expected = -1;
|
| + shouldBe("bar(i, i + 1)", "" + expected);
|
| +}
|
|
|
|
|