Index: src/mark-compact.cc |
diff --git a/src/mark-compact.cc b/src/mark-compact.cc |
index 0501ccf5805a0c752a01c4876895ba2b7863bf53..43ad7e99f14a22dd5cb29d71ca91ec43d01854b2 100644 |
--- a/src/mark-compact.cc |
+++ b/src/mark-compact.cc |
@@ -2055,6 +2055,17 @@ void MarkCompactCollector::MarkRoots(RootMarkingVisitor* visitor) { |
// etc., and all objects reachable from them. |
heap()->IterateStrongRoots(visitor, VISIT_ONLY_STRONG); |
+ // If the call-site of the top optimized code was not prepared for |
+ // deoptimization, then treat the maps in the code as strong pointers, |
+ // otherwise a map can die and deoptimize the code. |
Michael Starzinger
2013/07/02 14:20:54
Can we move this into MarkCompactCollector::MarkLi
ulan
2013/07/02 14:45:41
Done.
|
+ StackFrame* frame = isolate()->TopOptimizedFrame(); |
+ if (frame) { |
+ Code* code = frame->LookupCode(); |
+ if (!code->CanDeoptAt(frame->pc())) { |
+ code->CodeIterateBody(visitor); |
+ } |
+ } |
+ |
// Handle the string table specially. |
MarkStringTable(); |