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

Unified Diff: runtime/vm/stack_frame.cc

Issue 23445012: Mark exception handlers if they have a stacktrace specified. Do not build a stacktrace if the handl… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 4 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
« no previous file with comments | « runtime/vm/stack_frame.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/stack_frame.cc
===================================================================
--- runtime/vm/stack_frame.cc (revision 26819)
+++ runtime/vm/stack_frame.cc (working copy)
@@ -154,7 +154,9 @@
}
-bool StackFrame::FindExceptionHandler(uword* handler_pc) const {
+bool StackFrame::FindExceptionHandler(uword* handler_pc,
+ bool* needs_stacktrace,
+ bool* is_catch_all) const {
const Code& code = Code::Handle(LookupDartCode());
if (code.IsNull()) {
return false; // Stub frames do not have exception handlers.
@@ -163,13 +165,15 @@
// Find pc descriptor for the current pc.
const PcDescriptors& descriptors =
PcDescriptors::Handle(code.pc_descriptors());
+ ExceptionHandlers& handlers = ExceptionHandlers::Handle();
for (intptr_t i = 0; i < descriptors.Length(); i++) {
if ((static_cast<uword>(descriptors.PC(i)) == pc()) &&
(descriptors.TryIndex(i) != -1)) {
const intptr_t try_index = descriptors.TryIndex(i);
- const ExceptionHandlers& handlers =
- ExceptionHandlers::Handle(code.exception_handlers());
+ handlers = code.exception_handlers();
*handler_pc = handlers.HandlerPC(try_index);
+ *needs_stacktrace = handlers.NeedsStacktrace(try_index);
+ *is_catch_all = handlers.HasCatchAll(try_index);
return true;
}
}
« no previous file with comments | « runtime/vm/stack_frame.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698