-
Notifications
You must be signed in to change notification settings - Fork 30k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
deps: backport 6df9a1d from upstream v8
PR-URL: nodejs-private/node-private#6 Reviewed-By: Fedor Indutny <fedor@indutny.com>
- Loading branch information
1 parent
d332ae4
commit 004778e
Showing
2 changed files
with
14 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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)); |