| Index: src/frames.cc
|
| diff --git a/src/frames.cc b/src/frames.cc
|
| index 5ea0fd84ca3eac49fe61cb92aeefb0dae972a066..196e4579e9a818b8f2645a3d000ebe91316fadac 100644
|
| --- a/src/frames.cc
|
| +++ b/src/frames.cc
|
| @@ -674,8 +674,22 @@ void StandardFrame::IterateCompiledFrame(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++) {
|
| @@ -719,12 +733,6 @@ int StubFrame::GetNumberOfIncomingArguments() 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
|
| -
|
| IterateCompiledFrame(v);
|
| }
|
|
|
| @@ -987,6 +995,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
|
| @@ -1111,6 +1120,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.
|
|
|