| Index: src/frames.cc
|
| diff --git a/src/frames.cc b/src/frames.cc
|
| index 18dc54164afc1a92bdefb7e5d837efd0b0850794..9f55733ad82ce289b37211e11afc0e2651c5a567 100644
|
| --- a/src/frames.cc
|
| +++ b/src/frames.cc
|
| @@ -618,12 +618,6 @@ bool StandardFrame::IsExpressionInsideHandler(int n) const {
|
|
|
|
|
| void OptimizedFrame::Iterate(ObjectVisitor* v) const {
|
| -#ifdef DEBUG
|
| - // Make sure that optimized frames do not contain any stack handlers.
|
| - StackHandlerIterator it(this, top_handler());
|
| - ASSERT(it.done());
|
| -#endif
|
| -
|
| // Make sure that we're not doing "safe" stack frame iteration. We cannot
|
| // possibly find pointers in optimized frames in that state.
|
| ASSERT(!SafeStackFrameIterator::is_active(isolate()));
|
| @@ -669,8 +663,22 @@ void OptimizedFrame::Iterate(ObjectVisitor* v) const {
|
| uint8_t* safepoint_bits = safepoint_entry.bits();
|
| safepoint_bits += kNumSafepointRegisters >> kBitsPerByteLog2;
|
|
|
| - // Visit the rest of the parameters.
|
| - v->VisitPointers(parameters_base, parameters_limit);
|
| + // Visit the rest of the parameters and the exception handlers.
|
| + StackHandlerIterator handler_iterator(this, top_handler());
|
| + Object** next_parameter = parameters_base;
|
| + while (!handler_iterator.done()) {
|
| + // For each handler, visit the parameters down to the top of the handler
|
| + // and the handler itself.
|
| + StackHandler* handler = handler_iterator.handler();
|
| + Address handler_top = handler->address();
|
| + v->VisitPointers(next_parameter, reinterpret_cast<Object**>(handler_top));
|
| + handler->Iterate(v, code);
|
| + next_parameter =
|
| + reinterpret_cast<Object**>(handler_top + StackHandlerConstants::kSize);
|
| + handler_iterator.Advance();
|
| + }
|
| + // And visit all remaining parameters.
|
| + v->VisitPointers(next_parameter, parameters_limit);
|
|
|
| // Visit pointer spill slots and locals.
|
| for (unsigned index = 0; index < stack_slots; index++) {
|
| @@ -878,6 +886,7 @@ void OptimizedFrame::Summarize(List<FrameSummary>* frames) {
|
| BailoutId ast_id = BailoutId(it.Next());
|
| JSFunction* function = LiteralAt(literal_array, it.Next());
|
| it.Next(); // Skip height.
|
| + it.Next(); // Skip handler count.
|
|
|
| // The translation commands are ordered and the receiver is always
|
| // at the first position. Since we are always at a call when we need
|
| @@ -1002,6 +1011,7 @@ void OptimizedFrame::GetFunctions(List<JSFunction*>* functions) {
|
| it.Next(); // Skip ast id.
|
| JSFunction* function = LiteralAt(literal_array, it.Next());
|
| it.Next(); // Skip height.
|
| + it.Next(); // Skip handler count;
|
| functions->Add(function);
|
| } else {
|
| // Skip over operands to advance to the next opcode.
|
|
|