1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 06:17:35 +00:00

LibJS: Add a global "Object" constructor

This patch adds an "Object" constructor to the global object. The only
function it implements so far is Object.getPrototypeOf().
This commit is contained in:
Andreas Kling 2020-03-28 17:23:54 +01:00
parent a3d92b1210
commit 14047ca432
9 changed files with 134 additions and 3 deletions

View file

@ -79,7 +79,7 @@ public:
}
Value(Object* object)
: m_type(Type::Object)
: m_type(object ? Type::Object : Type::Null)
{
m_value.as_object = object;
}