Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(225)

Unified Diff: test/mjsunit/json-recursive.js

Issue 11186025: Reimplement a simpler version of JSON.stringify. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/mjsunit/json.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/json-recursive.js
diff --git a/test/mjsunit/regress/regress-2045.js b/test/mjsunit/json-recursive.js
similarity index 84%
copy from test/mjsunit/regress/regress-2045.js
copy to test/mjsunit/json-recursive.js
index 822ee1fa4641b4a0ba15eee2c2a2e59411db7d4d..f28cce8139f917aec17e54dc62916274b08ed3f6 100644
--- a/test/mjsunit/regress/regress-2045.js
+++ b/test/mjsunit/json-recursive.js
@@ -25,25 +25,20 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --allow-natives-syntax
-function foo() {
- assertEquals(2, arguments.length);
+var a = {};
+for (i = 0; i < 10000; i++) {
+ var current = {};
+ current.a = a;
+ a = current;
}
-function bar() {
- G.x;
- return foo.apply(this, arguments);
+function rec(a,b,c,d,e,f,g,h,i,j,k,l,m,n) {
+ JSON.stringify(a);
+ rec(a,b,c,d,e,f,g,h,i,j,k,l,m,n);
}
-function baz() {
- return bar(1, 2);
-}
+assertThrows(
+ function() { rec(1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4) },
+ RangeError);
-G = {x: 0};
-baz();
-baz();
-%OptimizeFunctionOnNextCall(baz);
-baz();
-delete G.x;
-baz();
« no previous file with comments | « test/mjsunit/json.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698