Chromium Code Reviews

Unified Diff: src/objects-debug.cc

Issue 640303006: Weak Cells (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebase Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: src/objects-debug.cc
diff --git a/src/objects-debug.cc b/src/objects-debug.cc
index d9d5c056b163b6e2b21c48a1f61071147b1b4fd1..92bd97a87fcdde55ecb64f79f1469d6c99731f77 100644
--- a/src/objects-debug.cc
+++ b/src/objects-debug.cc
@@ -125,6 +125,9 @@ void HeapObject::HeapObjectVerify() {
case PROPERTY_CELL_TYPE:
PropertyCell::cast(this)->PropertyCellVerify();
break;
+ case WEAK_CELL_TYPE:
+ WeakCell::cast(this)->WeakCellVerify();
+ break;
case JS_ARRAY_TYPE:
JSArray::cast(this)->JSArrayVerify();
break;
@@ -635,6 +638,13 @@ void PropertyCell::PropertyCellVerify() {
}
+void WeakCell::WeakCellVerify() {
+ CHECK(IsWeakCell());
+ VerifyObjectField(kValueOffset);
+ VerifyObjectField(kNextOffset);
+}
+
+
void Code::CodeVerify() {
CHECK(IsAligned(reinterpret_cast<intptr_t>(instruction_start()),
kCodeAlignment));
« src/heap/objects-visiting-inl.h ('K') | « src/objects.cc ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine