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

Unified Diff: src/objects-debug.cc

Issue 2915793002: [api] Prototype WeakRef implementation
Patch Set: Created 3 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/objects-body-descriptors-inl.h ('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 f6ec4f398e04453e6eb5f0ab1db2d1bf9b548774..6bf603f1f4ed72376ca854315e7f69f6d75de885 100644
--- a/src/objects-debug.cc
+++ b/src/objects-debug.cc
@@ -216,6 +216,9 @@ void HeapObject::HeapObjectVerify() {
case JS_WEAK_SET_TYPE:
JSWeakSet::cast(this)->JSWeakSetVerify();
break;
+ case JS_WEAK_REF_TYPE:
+ JSWeakRef::cast(this)->JSWeakRefVerify();
+ break;
case JS_PROMISE_CAPABILITY_TYPE:
JSPromiseCapability::cast(this)->JSPromiseCapabilityVerify();
break;
@@ -969,6 +972,12 @@ void JSWeakSet::JSWeakSetVerify() {
VerifyHeapPointer(table());
CHECK(table()->IsHashTable() || table()->IsUndefined(GetIsolate()));
}
+void JSWeakRef::JSWeakRefVerify() {
+ CHECK(IsJSWeakRef());
+ JSObjectVerify();
+ VerifyHeapPointer(table());
+ CHECK(table()->IsHashTable() || table()->IsUndefined(GetIsolate()));
+}
void JSPromiseCapability::JSPromiseCapabilityVerify() {
CHECK(IsJSPromiseCapability());
« no previous file with comments | « src/objects-body-descriptors-inl.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698