From ed14b64e657de1446a65da58f51d431d3a915bdf Mon Sep 17 00:00:00 2001 From: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> Date: Mon, 21 Aug 2023 21:24:49 -0700 Subject: Make the code generator less duplicative --- src/bun.js/scripts/generate-classes.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/bun.js/scripts/generate-classes.ts') diff --git a/src/bun.js/scripts/generate-classes.ts b/src/bun.js/scripts/generate-classes.ts index 0b88a3eb1..b6fbe0915 100644 --- a/src/bun.js/scripts/generate-classes.ts +++ b/src/bun.js/scripts/generate-classes.ts @@ -1033,7 +1033,6 @@ void ${name}::visitChildrenImpl(JSCell* cell, Visitor& visitor) ${name}* thisObject = jsCast<${name}*>(cell); ASSERT_GC_OBJECT_INHERITS(thisObject, info()); Base::visitChildren(thisObject, visitor); - ${values} ${ estimatedSize ? `if (auto* ptr = thisObject->wrapped()) { @@ -1041,8 +1040,7 @@ visitor.reportExtraMemoryVisited(${symbolName(obj.name, "estimatedSize")}(ptr)); }` : "" } -${DEFINE_VISIT_CHILDREN_LIST} -${hasPendingActivity ? `visitor.addOpaqueRoot(thisObject->wrapped());` : ""} + thisObject->visitAdditionalChildren(visitor); } DEFINE_VISIT_CHILDREN(${name}); -- cgit v1.2.3