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

Unified Diff: src/heap/mark-compact.cc

Issue 637253004: Use smi zero instead of undefine_value to zap dead weak cells. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 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 | « no previous file | src/heap/objects-visiting-inl.h » ('j') | src/heap/objects-visiting-inl.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/mark-compact.cc
diff --git a/src/heap/mark-compact.cc b/src/heap/mark-compact.cc
index f53fb6c177c675e4e74c685f9633d011398220f6..a786f2df7168dbac9d7c337958cea183d13f4483 100644
--- a/src/heap/mark-compact.cc
+++ b/src/heap/mark-compact.cc
@@ -2744,9 +2744,9 @@ void MarkCompactCollector::ProcessAndClearWeakCells() {
Object* weak_cell_obj = heap()->encountered_weak_cells();
while (weak_cell_obj != Smi::FromInt(0)) {
WeakCell* weak_cell = reinterpret_cast<WeakCell*>(weak_cell_obj);
- HeapObject* value = weak_cell->value();
+ Object* value = weak_cell->value();
if (!MarkCompactCollector::IsMarked(value)) {
Erik Corry Chromium.org 2014/10/20 08:00:17 IsMarked will assert that the value is a heap obje
ulan 2014/10/20 12:30:18 Done.
- weak_cell->clear(undefined);
+ weak_cell->clear();
} else {
Object** slot = HeapObject::RawField(weak_cell, WeakCell::kValueOffset);
heap()->mark_compact_collector()->RecordSlot(slot, slot, value);
« no previous file with comments | « no previous file | src/heap/objects-visiting-inl.h » ('j') | src/heap/objects-visiting-inl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698