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

Unified Diff: test/mjsunit/stack-traces-overflow.js

Issue 234703006: Prevent real stack overflow when handling JavaScript stack overflow (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 6 years, 8 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 | « src/messages.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/stack-traces-overflow.js
diff --git a/test/mjsunit/stack-traces-overflow.js b/test/mjsunit/stack-traces-overflow.js
index 7722e93bd26129f91c2dae44b8294fbb76806c19..e19d010016be905f820b835c4091eb5a6be8371d 100644
--- a/test/mjsunit/stack-traces-overflow.js
+++ b/test/mjsunit/stack-traces-overflow.js
@@ -1,4 +1,4 @@
-// Copyright 2012 the V8 project authors. All rights reserved.
+// Copyright 2014 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
@@ -113,6 +113,14 @@ try {
assertEquals(undefined, e.stack);
}
+Error.__defineGetter__('stackTraceLimit', function() { rec1(0); });
+try {
+ rec1(0);
+} catch (e) {
+ // Make sure we do not crash.
+ e.stack;
+}
+
Error.stackTraceLimit = 3;
Error = ""; // Overwrite Error in the global object.
try {
« no previous file with comments | « src/messages.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698