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

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

Issue 300843009: Fix processing of partially initialized JSWeakCollection. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 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/mark-compact.cc ('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 65c93a288bfb553ed792013c185b3896675e26d0..057b8ae99ffc3651e80b729c6f96f9335cb342a3 100644
--- a/src/objects-visiting-inl.h
+++ b/src/objects-visiting-inl.h
@@ -404,7 +404,7 @@ void StaticMarkingVisitor<StaticVisitor>::VisitWeakCollection(
reinterpret_cast<JSWeakCollection*>(object);
MarkCompactCollector* collector = heap->mark_compact_collector();
- // Enqueue weak map in linked list of encountered weak maps.
+ // Enqueue weak collection in linked list of encountered weak collections.
if (weak_collection->next() == heap->undefined_value()) {
weak_collection->set_next(collector->encountered_weak_collections());
collector->set_encountered_weak_collections(weak_collection);
@@ -420,6 +420,7 @@ void StaticMarkingVisitor<StaticVisitor>::VisitWeakCollection(
STATIC_ASSERT(JSWeakCollection::kNextOffset + kPointerSize ==
JSWeakCollection::kSize);
+ // Partially initialized weak collection is enqueued, but table is ignored.
if (!weak_collection->table()->IsHashTable()) return;
// Mark the backing hash table without pushing it on the marking stack.
« no previous file with comments | « src/mark-compact.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698