Ensure that empty descriptor array is marked before visiting any maps in marking phase.

Review URL: http://codereview.chromium.org/3318014

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5416 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
vegorov@chromium.org 2010-09-07 09:15:15 +00:00
parent 119f630b67
commit 983ed89a14

View File

@ -643,9 +643,13 @@ void MarkCompactCollector::PrepareForCodeFlushing() {
#endif
StaticMarkingVisitor::EnableCodeFlushing(true);
// Ensure that empty descriptor array is marked. Method MarkDescriptorArray
// relies on it being marked before any other descriptor array.
MarkObject(Heap::raw_unchecked_empty_descriptor_array());
// Make sure we are not referencing the code from the stack.
for (StackFrameIterator it; !it.done(); it.Advance()) {
MarkCompactCollector::MarkObject(it.frame()->unchecked_code());
MarkObject(it.frame()->unchecked_code());
}
// Iterate the archived stacks in all threads to check if
@ -656,7 +660,7 @@ void MarkCompactCollector::PrepareForCodeFlushing() {
SharedFunctionInfoMarkingVisitor visitor;
CompilationCache::IterateFunctions(&visitor);
MarkCompactCollector::ProcessMarkingStack();
ProcessMarkingStack();
}