Commit 3260fb94 authored by vitalyr@chromium.org's avatar vitalyr@chromium.org

Add stack traces to mjsunit tests.

Review URL: http://codereview.chromium.org/2094005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4654 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 773c503d
......@@ -299,5 +299,10 @@ void ReportException(v8::TryCatch* try_catch) {
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);
}
}
}
......@@ -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 () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment