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

Unified Diff: runtime/vm/stack_frame.cc

Issue 23531008: Last round of cleanups in exception handler, before going to the next stage. (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/raw_object.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 26938)
+++ runtime/vm/stack_frame.cc (working copy)
@@ -156,28 +156,31 @@
bool StackFrame::FindExceptionHandler(uword* handler_pc,
bool* needs_stacktrace,
- bool* is_catch_all) const {
- const Code& code = Code::Handle(LookupDartCode());
+ bool* has_catch_all) const {
+ Isolate* isolate = Isolate::Current();
+ Code& code = Code::Handle(isolate, LookupDartCode());
if (code.IsNull()) {
return false; // Stub frames do not have exception handlers.
}
ExceptionHandlers& handlers =
- ExceptionHandlers::Handle(code.exception_handlers());
+ ExceptionHandlers::Handle(isolate, code.exception_handlers());
if (handlers.Length() == 0) {
return false;
}
// Find pc descriptor for the current pc.
const PcDescriptors& descriptors =
- PcDescriptors::Handle(code.pc_descriptors());
- for (intptr_t i = 0; i < descriptors.Length(); i++) {
+ PcDescriptors::Handle(isolate, code.pc_descriptors());
+ const intptr_t len = descriptors.Length();
+ for (intptr_t i = 0; i < len; i++) {
if ((static_cast<uword>(descriptors.PC(i)) == pc()) &&
(descriptors.TryIndex(i) != -1)) {
const intptr_t try_index = descriptors.TryIndex(i);
- handlers = code.exception_handlers();
- *handler_pc = handlers.HandlerPC(try_index);
- *needs_stacktrace = handlers.NeedsStacktrace(try_index);
- *is_catch_all = handlers.HasCatchAll(try_index);
+ RawExceptionHandlers::HandlerInfo handler_info;
+ handlers.GetHandlerInfo(try_index, &handler_info);
+ *handler_pc = handler_info.handler_pc;
+ *needs_stacktrace = handler_info.needs_stacktrace;
+ *has_catch_all = handler_info.has_catch_all;
return true;
}
}
« no previous file with comments | « runtime/vm/raw_object.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698