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

Unified Diff: runtime/vm/parser.cc

Issue 12316116: Add functionality to get full stack trace when exceptions are thrown. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 10 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
Index: runtime/vm/parser.cc
===================================================================
--- runtime/vm/parser.cc (revision 19105)
+++ runtime/vm/parser.cc (working copy)
@@ -6301,11 +6301,18 @@
// A stack trace variable is specified in this block, so generate code
// to load the stack trace object (:stacktrace_var) into the stack trace
// variable specified in this block.
+ ArgumentListNode* no_args = new ArgumentListNode(catch_pos);
LocalVariable* trace = LookupLocalScope(*stack_trace_param.var);
ASSERT(catch_trace_var != NULL);
current_block_->statements->Add(
new StoreLocalNode(catch_pos, trace,
new LoadLocalNode(catch_pos, catch_trace_var)));
+ current_block_->statements->Add(
+ new InstanceCallNode(
+ catch_pos,
+ new LoadLocalNode(catch_pos, trace),
+ PrivateCoreLibName(Symbols::_setupFullStackTrace()),
+ no_args));
}
ParseStatementSequence(); // Parse the catch handler code.

Powered by Google App Engine
This is Rietveld 408576698