mirror of
https://github.com/oven-sh/bun
synced 2026-02-12 11:59:00 +00:00
fix(jest): fix segfault when passing jest.fn into another jest.fn (#7507)
Close: #5900
This commit is contained in:
@@ -280,6 +280,8 @@ public:
|
||||
if (lengthJSValue.isNumber()) {
|
||||
this->putDirect(vm, vm.propertyNames->length, (lengthJSValue), JSC::PropertyAttribute::DontEnum | JSC::PropertyAttribute::ReadOnly);
|
||||
}
|
||||
} else if (auto* fn = jsDynamicCast<JSMockFunction*>(value)) {
|
||||
nameToUse = fn->get(global, vm.propertyNames->name).toWTFString(global);
|
||||
} else if (auto* fn = jsDynamicCast<InternalFunction*>(value)) {
|
||||
nameToUse = fn->name();
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user