Skip to content

Commit

Permalink
Support PropertyAttribute::Constructable in static hash tables
Browse files Browse the repository at this point in the history
  • Loading branch information
Jarred-Sumner authored Sep 17, 2023
1 parent 83e79f8 commit 64b2d41
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Source/JavaScriptCore/runtime/Lookup.h
Original file line number Diff line number Diff line change
Expand Up @@ -494,6 +494,13 @@ inline void reifyStaticProperty(VM& vm, const ClassInfo* classInfo, const Proper
value.domJITFunction(), ImplementationVisibility::Public, value.intrinsic(), value.signature(), attributesForStructure(value.attributes()));
return;
}
#if USE(BUN_JSC_ADDITIONS)
if (value.attribtes() & PropertyAttribute::Constructable) {
JSFunction* function = JSFunction::create(vm, thisObj.globalObject(), value.functionLength(), propertyName, value.function(), ImplementationVisibility::Public, value.intrinsic(), value.function(), nullptr);
putDirect(vm, propertyName, function, attributesForStructure(value.attributes()));
return;
}
#endif
thisObj.putDirectNativeFunction(
vm, thisObj.globalObject(), propertyName, value.functionLength(),
value.function(), ImplementationVisibility::Public, value.intrinsic(), attributesForStructure(value.attributes()));
Expand Down

0 comments on commit 64b2d41

Please sign in to comment.