Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(203)

Unified Diff: src/objects-visiting-inl.h

Issue 209473006: Ensure that we don't mark weak heap references in the constant pool array. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: replace with CHECK Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/objects-inl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-visiting-inl.h
diff --git a/src/objects-visiting-inl.h b/src/objects-visiting-inl.h
index bea201a6f334b68df21969d1089c23625030a6dd..f46adcc78d3dccd822c15dd48f7b493e663a97ab 100644
--- a/src/objects-visiting-inl.h
+++ b/src/objects-visiting-inl.h
@@ -498,8 +498,14 @@ void StaticMarkingVisitor<StaticVisitor>::VisitConstantPoolArray(
}
for (int i = 0; i < constant_pool->count_of_heap_ptr_entries(); i++) {
int index = constant_pool->first_heap_ptr_index() + i;
- StaticVisitor::VisitPointer(heap,
- constant_pool->RawFieldOfElementAt(index));
+ Object** slot = constant_pool->RawFieldOfElementAt(index);
+ HeapObject* object = HeapObject::cast(*slot);
+ heap->mark_compact_collector()->RecordSlot(slot, slot, object);
+ if (!(constant_pool->get_weak_object_state() ==
+ ConstantPoolArray::WEAK_OBJECTS_IN_OPTIMIZED_CODE &&
+ Code::IsWeakObjectInOptimizedCode(object))) {
+ StaticVisitor::MarkObject(heap, object);
+ }
}
}
« no previous file with comments | « src/objects-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698