Index: src/objects-inl.h |
diff --git a/src/objects-inl.h b/src/objects-inl.h |
index 91bd0092244536b8293999e80640e56f9235a762..057331c27c7a4f56a7aa65393c376073e94f388c 100644 |
--- a/src/objects-inl.h |
+++ b/src/objects-inl.h |
@@ -1930,14 +1930,12 @@ void PropertyCell::set_type_raw(Object* val, WriteBarrierMode ignored) { |
} |
-HeapObject* WeakCell::value() const { |
+Object* WeakCell::value() const { |
return HeapObject::cast(READ_FIELD(this, kValueOffset)); |
} |
-void WeakCell::clear(HeapObject* undefined) { |
- WRITE_FIELD(this, kValueOffset, undefined); |
-} |
+void WeakCell::clear() { WRITE_FIELD(this, kValueOffset, Smi::FromInt(0)); } |
Erik Corry Chromium.org
2014/10/20 08:00:18
If this should only be called by the GC, can we as
ulan
2014/10/20 12:30:19
Done.
|
void WeakCell::initialize(HeapObject* val) { |
@@ -1946,6 +1944,9 @@ void WeakCell::initialize(HeapObject* val) { |
} |
+bool WeakCell::cleared() const { return value() == Smi::FromInt(0); } |
+ |
+ |
Object* WeakCell::next() const { return READ_FIELD(this, kNextOffset); } |