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

Unified Diff: src/objects-debug.cc

Issue 640303006: Weak Cells (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Skip cleared weak cells 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 | « src/objects.cc ('k') | src/objects-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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));
« no previous file with comments | « src/objects.cc ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698