1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-08 13:37:10 +09:00
ladybird/Libraries/LibJS/Runtime/RawJSONObject.cpp

22 lines
523 B
C++

/*
* Copyright (c) 2025, Artsiom Yafremau <aplefull@gmail.com>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <LibJS/Runtime/GlobalObject.h>
#include <LibJS/Runtime/RawJSONObject.h>
namespace JS {
GC_DEFINE_ALLOCATOR(RawJSONObject);
GC::Ref<RawJSONObject> RawJSONObject::create(Realm& realm, Object* prototype)
{
if (!prototype)
return realm.create<RawJSONObject>(realm.intrinsics().empty_object_shape());
return realm.create<RawJSONObject>(ConstructWithPrototypeTag::Tag, *prototype);
}
}