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

Unified Diff: runtime/vm/object.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
Index: runtime/vm/object.cc
===================================================================
--- runtime/vm/object.cc (revision 26792)
+++ runtime/vm/object.cc (working copy)
@@ -8284,11 +8284,13 @@
void ExceptionHandlers::SetHandlerInfo(intptr_t try_index,
intptr_t outer_try_index,
- intptr_t handler_pc) const {
+ intptr_t handler_pc,
+ bool needs_stacktrace) const {
ASSERT((try_index >= 0) && (try_index < Length()));
RawExceptionHandlers::HandlerInfo* info = &raw_ptr()->data_[try_index];
info->outer_try_index = outer_try_index;
info->handler_pc = handler_pc;
+ info->needs_stacktrace = needs_stacktrace;
}
void ExceptionHandlers::GetHandlerInfo(
@@ -8314,6 +8316,12 @@
}
+bool ExceptionHandlers::NeedsStacktrace(intptr_t try_index) const {
+ ASSERT((try_index >= 0) && (try_index < Length()));
+ return raw_ptr()->data_[try_index].needs_stacktrace;
+}
+
+
void ExceptionHandlers::SetHandledTypes(intptr_t try_index,
const Array& handled_types) const {
ASSERT((try_index >= 0) && (try_index < Length()));
@@ -8338,7 +8346,7 @@
RawExceptionHandlers* ExceptionHandlers::New(intptr_t num_handlers) {
ASSERT(Object::exception_handlers_class() != Class::null());
- if (num_handlers < 0 || num_handlers >= kMaxHandlers) {
+ if ((num_handlers < 0) || (num_handlers >= kMaxHandlers)) {
FATAL1("Fatal error in ExceptionHandlers::New(): "
"invalid num_handlers %" Pd "\n",
num_handlers);

Powered by Google App Engine
This is Rietveld 408576698