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

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

Issue 2191293002: Move FormatStackTrace to C++ (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add formatting_stack_trace to ISOLATE_INIT_LIST Created 4 years, 5 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/cctest/interpreter/bytecode_expectations/CallRuntime.golden ('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.js
diff --git a/test/mjsunit/stack-traces.js b/test/mjsunit/stack-traces.js
index 9d9fd23ccfc7cdde7b649991536090f197ccedc3..bd7909383fc29a63e77f67f8e1a942476a765718 100644
--- a/test/mjsunit/stack-traces.js
+++ b/test/mjsunit/stack-traces.js
@@ -411,3 +411,15 @@ try {
} catch (e) {
assertEquals(undefined, e.stack);
}
+
+// Check that a tight recursion in prepareStackTrace fails gracefully, i.e.
+// a range error is thrown and printed (but without showing the actual stack).
+
+Error.prepareStackTrace = () => Error.prepareStackTrace();
+try {
+ new Error().stack;
+} catch (e) {
+ assertTrue(
+ e.stack.indexOf("RangeError: Maximum call stack size exceeded") != -1);
+ assertTrue(e.stack.indexOf("prepareStackTrace") == -1);
+}
« no previous file with comments | « test/cctest/interpreter/bytecode_expectations/CallRuntime.golden ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698