Index: src/frames.cc |
diff --git a/src/frames.cc b/src/frames.cc |
index debaf3ba72729d622c6a05f585283e7ed962e798..fdc6431dfe8957e2f7eab19ce0215dcbb2825d21 100644 |
--- a/src/frames.cc |
+++ b/src/frames.cc |
@@ -666,6 +666,13 @@ void StandardFrame::IterateCompiledFrame(ObjectVisitor* v) const { |
// Visit the return address in the callee and incoming arguments. |
IteratePc(v, pc_address(), code); |
+ |
+ // Visit the context in stub frame and JavaScript frame. |
+ // Visit the function in JavaScript frame. |
+ Object** fixed_base = &Memory::Object_at( |
+ fp() + StandardFrameConstants::kMarkerOffset); |
+ Object** fixed_limit = &Memory::Object_at(fp()); |
+ v->VisitPointers(fixed_base, fixed_limit); |
} |
@@ -697,12 +704,6 @@ void OptimizedFrame::Iterate(ObjectVisitor* v) const { |
#endif |
IterateCompiledFrame(v); |
- |
- // Visit the context and the function. |
- Object** fixed_base = &Memory::Object_at( |
- fp() + JavaScriptFrameConstants::kFunctionOffset); |
- Object** fixed_limit = &Memory::Object_at(fp()); |
- v->VisitPointers(fixed_base, fixed_limit); |
} |