Revision: 4654 Author: [email protected] Date: Fri May 14 03:00:24 2010 Log: Add stack traces to mjsunit tests.
Review URL: http://codereview.chromium.org/2094005 http://code.google.com/p/v8/source/detail?r=4654 Modified: /branches/bleeding_edge/samples/shell.cc /branches/bleeding_edge/test/mjsunit/mjsunit.js ======================================= --- /branches/bleeding_edge/samples/shell.cc Fri Apr 17 14:04:34 2009 +++ /branches/bleeding_edge/samples/shell.cc Fri May 14 03:00:24 2010 @@ -299,5 +299,10 @@ printf("^"); } printf("\n"); + v8::String::Utf8Value stack_trace(try_catch->StackTrace()); + if (stack_trace.length() > 0) { + const char* stack_trace_string = ToCString(stack_trace); + printf("%s\n", stack_trace_string); + } } } ======================================= --- /branches/bleeding_edge/test/mjsunit/mjsunit.js Mon Feb 1 02:31:55 2010 +++ /branches/bleeding_edge/test/mjsunit/mjsunit.js Fri May 14 03:00:24 2010 @@ -27,6 +27,8 @@ function MjsUnitAssertionError(message) { this.message = message; + // This allows fetching the stack trace using TryCatch::StackTrace. + this.stack = new Error("").stack; } MjsUnitAssertionError.prototype.toString = function () { -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
