mirror of
https://github.com/oven-sh/bun
synced 2026-02-16 13:51:47 +00:00
createEmptyObjectWithNullPrototype
This commit is contained in:
@@ -1601,15 +1601,10 @@ JSC__JSObject__create(JSC__JSGlobalObject* globalObject, size_t initialCapacity,
|
||||
return JSC::JSValue::encode(object);
|
||||
}
|
||||
|
||||
JSC__JSValue JSC__JSValue__constructEmptyObject(JSC__JSGlobalObject* globalObject,
|
||||
JSC__JSObject* prototype,
|
||||
size_t initialCapacity)
|
||||
JSC__JSValue JSC__JSValue__createEmptyObjectWithNullPrototype(JSC__JSGlobalObject* globalObject)
|
||||
{
|
||||
if (prototype == nullptr) {
|
||||
return JSC::JSValue::encode(JSC::constructEmptyObject(globalObject->vm(), globalObject->nullPrototypeObjectStructure()));
|
||||
} else {
|
||||
return JSC::JSValue::encode(JSC::constructEmptyObject(globalObject, prototype, std::min(static_cast<unsigned int>(initialCapacity), JSFinalObject::maxInlineCapacity)));
|
||||
}
|
||||
return JSValue::encode(
|
||||
JSC::constructEmptyObject(globalObject->vm(), globalObject->nullPrototypeObjectStructure()));
|
||||
}
|
||||
|
||||
JSC__JSValue JSC__JSValue__createEmptyObject(JSC__JSGlobalObject* globalObject,
|
||||
|
||||
Reference in New Issue
Block a user