Reviewers: mvstanton,
Description:
Add flag to print stack trace on illegal exception.
This would help a lot with native Javascript code.
[email protected]
Please review this at https://codereview.chromium.org/156373003/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+3, -0 lines):
M src/flag-definitions.h
M src/isolate.cc
Index: src/flag-definitions.h
diff --git a/src/flag-definitions.h b/src/flag-definitions.h
index
c0eaf16da2c22674c7e0d913cb2cffb40a98169d..688b48192f55f9c3a838fe54f4b68fb9bb7fcbb5
100644
--- a/src/flag-definitions.h
+++ b/src/flag-definitions.h
@@ -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,
Index: src/isolate.cc
diff --git a/src/isolate.cc b/src/isolate.cc
index
8a2f4219c763e014b89720d2c72fe84da981028b..54d614a0a4e1462a1054a2c315eff305197a697c
100644
--- a/src/isolate.cc
+++ b/src/isolate.cc
@@ -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());
}
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.