Commit 557b40d9 authored by yangguo@chromium.org's avatar yangguo@chromium.org

Add flag to print stack trace on illegal exception.

This would help a lot with native Javascript code.

R=mvstanton@chromium.org

Review URL: https://codereview.chromium.org/156373003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19251 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 3c012436
......@@ -591,6 +591,8 @@ DEFINE_int(sim_stack_alignment, 8,
"Stack alingment in bytes in simulator (4 or 8, 8 is default)")
// isolate.cc
DEFINE_bool(stack_trace_on_illegal, false,
"print stack trace when an illegal exception is thrown")
DEFINE_bool(abort_on_uncaught_exception, false,
"abort program (dump core) when an uncaught exception is thrown")
DEFINE_bool(trace_exception, false,
......
......@@ -946,6 +946,7 @@ Failure* Isolate::ReThrow(MaybeObject* exception) {
Failure* Isolate::ThrowIllegalOperation() {
if (FLAG_stack_trace_on_illegal) PrintStack(stdout);
return Throw(heap_.illegal_access_string());
}
......
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