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

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

Issue 1950913004: [Interpreter] Fix bytecode offset for stack overflows. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Also fixes error-to-sttring-stack-overflow.html Created 4 years, 7 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/x87/builtins-x87.cc ('k') | tools/blink_tests/TestExpectationsIgnition » ('j') | 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 e20c6091d773c4b29c7b53db101b8779b064bd57..af81971af1ee902e1a8b3f0e31c5bc1495ef23c4 100644
--- a/test/mjsunit/stack-traces-overflow.js
+++ b/test/mjsunit/stack-traces-overflow.js
@@ -27,10 +27,22 @@
// Flags: --stack-size=100
+function overflow() {
+ var a, b, c, d, e; // Allocates some locals on the function's stack frame.
+ overflow();
+}
function rec1(a) { rec1(a+1); }
function rec2(a) { rec3(a+1); }
function rec3(a) { rec2(a+1); }
+// Test stack trace has correct function location at top of the stack.
+try {
+ overflow();
+} catch (e) {
+ var first_frame = e.stack.split("\n")[1]
+ assertTrue(first_frame.indexOf("stack-traces-overflow.js:30:18") > 0);
+}
+
// Test stack trace getter and setter.
try {
rec1(0);
« no previous file with comments | « src/x87/builtins-x87.cc ('k') | tools/blink_tests/TestExpectationsIgnition » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698