| Index: runtime/vm/stack_frame.cc
|
| ===================================================================
|
| --- runtime/vm/stack_frame.cc (revision 17165)
|
| +++ runtime/vm/stack_frame.cc (working copy)
|
| @@ -152,29 +152,19 @@
|
| return false; // Stub frames do not have exception handlers.
|
| }
|
|
|
| - // First try to find pc descriptor for the current pc.
|
| - intptr_t try_index = -1;
|
| + // Find pc descriptor for the current pc.
|
| const PcDescriptors& descriptors =
|
| PcDescriptors::Handle(code.pc_descriptors());
|
| for (intptr_t i = 0; i < descriptors.Length(); i++) {
|
| if ((static_cast<uword>(descriptors.PC(i)) == pc()) &&
|
| (descriptors.TryIndex(i) != -1)) {
|
| - try_index = descriptors.TryIndex(i);
|
| - break;
|
| + const intptr_t try_index = descriptors.TryIndex(i);
|
| + const ExceptionHandlers& handlers =
|
| + ExceptionHandlers::Handle(code.exception_handlers());
|
| + *handler_pc = handlers.HandlerPC(try_index);
|
| + return true;
|
| }
|
| }
|
| - if (try_index != -1) {
|
| - // We found a pc descriptor, now try to see if we have an
|
| - // exception catch handler for this try index.
|
| - const ExceptionHandlers& handlers =
|
| - ExceptionHandlers::Handle(code.exception_handlers());
|
| - for (intptr_t j = 0; j < handlers.Length(); j++) {
|
| - if (handlers.TryIndex(j) == try_index) {
|
| - *handler_pc = handlers.HandlerPC(j);
|
| - return true;
|
| - }
|
| - }
|
| - }
|
| return false;
|
| }
|
|
|
|
|