From 004778e6df266dd6366fc455ac4e6dc3c697e53b Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Fri, 13 Nov 2015 21:23:33 +0100 Subject: deps: backport 6df9a1d from upstream v8 PR-URL: https://github.com/nodejs/node-private/pull/6 Reviewed-By: Fedor Indutny --- deps/v8/test/mjsunit/regress/regress-crbug-554946.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 deps/v8/test/mjsunit/regress/regress-crbug-554946.js (limited to 'deps/v8/test') diff --git a/deps/v8/test/mjsunit/regress/regress-crbug-554946.js b/deps/v8/test/mjsunit/regress/regress-crbug-554946.js new file mode 100644 index 0000000000..ab2e327295 --- /dev/null +++ b/deps/v8/test/mjsunit/regress/regress-crbug-554946.js @@ -0,0 +1,12 @@ +// Copyright 2015 the V8 project authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +var array = []; +var funky = { + toJSON: function() { array.length = 1; return "funky"; } +}; +for (var i = 0; i < 10; i++) array[i] = i; +array[0] = funky; +assertEquals('["funky",null,null,null,null,null,null,null,null,null]', + JSON.stringify(array)); -- cgit v1.2.1