From 9eaed7cec7a62309c854ad968bcaea4326bea151 Mon Sep 17 00:00:00 2001 From: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> Date: Thu, 18 Aug 2022 00:56:36 -0700 Subject: Fix missing `prototype` property on generated classes --- src/bun.js/scripts/generate-classes.ts | 1 + 1 file changed, 1 insertion(+) (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 84b81899d..3f8d4876b 100644 --- a/src/bun.js/scripts/generate-classes.ts +++ b/src/bun.js/scripts/generate-classes.ts @@ -332,6 +332,7 @@ void ${name}::finishCreation(VM& vm, JSC::JSGlobalObject* globalObject, ${protot ? `reifyStaticProperties(vm, &${name}::s_info, ${hashTableIdentifier}, *this);` : "" } + putDirectWithoutTransition(vm, vm.propertyNames->prototype, prototype, PropertyAttribute::DontEnum | PropertyAttribute::DontDelete | PropertyAttribute::ReadOnly); ASSERT(inherits(info())); } -- cgit v1.2.3