mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-08 05:27:14 +09:00
22 lines
523 B
C++
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);
|
|
}
|
|
|
|
}
|