summaryrefslogtreecommitdiff
path: root/deps/v8/test
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2015-11-13 21:23:33 +0100
committerRod Vagg <rod@vagg.org>2015-12-04 14:42:13 +1100
commit004778e6df266dd6366fc455ac4e6dc3c697e53b (patch)
tree49e5d5b942f92e88bba087d614aa567d02fab171 /deps/v8/test
parentd332ae4799fabc3852a22706b3d3496ebfcbf038 (diff)
downloadnode-new-004778e6df266dd6366fc455ac4e6dc3c697e53b.tar.gz
deps: backport 6df9a1d from upstream v8
PR-URL: https://github.com/nodejs/node-private/pull/6 Reviewed-By: Fedor Indutny <fedor@indutny.com>
Diffstat (limited to 'deps/v8/test')
-rw-r--r--deps/v8/test/mjsunit/regress/regress-crbug-554946.js12
1 files changed, 12 insertions, 0 deletions
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));