Index: src/mark-compact.cc |
diff --git a/src/mark-compact.cc b/src/mark-compact.cc |
index 449e6556e42f62ce5f23bfd45372426a0bfecb69..7eab22a8ce0d44f727c7ec071ecb066e9ffdfb9f 100644 |
--- a/src/mark-compact.cc |
+++ b/src/mark-compact.cc |
@@ -2181,28 +2181,20 @@ void MarkCompactCollector::ProcessEphemeralMarking(ObjectVisitor* visitor) { |
} |
-static StackFrame* TopOptimizedFrame(Isolate* isolate) { |
- for (StackFrameIterator it(isolate, isolate->thread_local_top()); |
+void MarkCompactCollector::ProcessTopOptimizedFrame(ObjectVisitor* visitor) { |
+ for (StackFrameIterator it(isolate(), isolate()->thread_local_top()); |
!it.done(); it.Advance()) { |
if (it.frame()->type() == StackFrame::JAVA_SCRIPT) { |
- return NULL; |
+ return; |
} |
if (it.frame()->type() == StackFrame::OPTIMIZED) { |
- return it.frame(); |
- } |
- } |
- return NULL; |
-} |
- |
- |
-void MarkCompactCollector::ProcessTopOptimizedFrame(ObjectVisitor* visitor) { |
- StackFrame* frame = TopOptimizedFrame(isolate()); |
- if (frame != NULL) { |
- Code* code = frame->LookupCode(); |
- if (!code->CanDeoptAt(frame->pc())) { |
- code->CodeIterateBody(visitor); |
+ Code* code = it.frame()->LookupCode(); |
+ if (!code->CanDeoptAt(it.frame()->pc())) { |
+ code->CodeIterateBody(visitor); |
+ } |
+ ProcessMarkingDeque(); |
+ return; |
} |
- ProcessMarkingDeque(); |
} |
} |