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

Unified Diff: src/objects-printer.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-inl.h ('k') | src/profiler/heap-snapshot-generator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-printer.cc
diff --git a/src/objects-printer.cc b/src/objects-printer.cc
index b4fbb4db15363561f35b37debaefa1ce0ab8c74f..b38217fd0be8d5c1f66d8b8663698ce6e71a085c 100644
--- a/src/objects-printer.cc
+++ b/src/objects-printer.cc
@@ -207,6 +207,9 @@ void HeapObject::HeapObjectPrint(std::ostream& os) { // NOLINT
case JS_WEAK_SET_TYPE:
JSWeakSet::cast(this)->JSWeakSetPrint(os);
break;
+ case JS_WEAK_REF_TYPE:
+ JSWeakRef::cast(this)->JSWeakRefPrint(os);
+ break;
case JS_MODULE_NAMESPACE_TYPE:
JSModuleNamespace::cast(this)->JSModuleNamespacePrint(os);
break;
@@ -947,6 +950,13 @@ void JSWeakSet::JSWeakSetPrint(std::ostream& os) { // NOLINT
}
+void JSWeakRef::JSWeakRefPrint(std::ostream& os) { // NOLINT
+ JSObjectPrintHeader(os, this, "JSWeakRef");
+ os << "\n - table = " << Brief(table());
+ JSObjectPrintBody(os, this);
+}
+
+
void JSArrayBuffer::JSArrayBufferPrint(std::ostream& os) { // NOLINT
JSObjectPrintHeader(os, this, "JSArrayBuffer");
os << "\n - backing_store = " << backing_store();
« no previous file with comments | « src/objects-inl.h ('k') | src/profiler/heap-snapshot-generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698