LibJS: Add ObjectPrototype and implement hasOwnProperty()

All Objects will now have ObjectPrototype as their prototype, unless
overridden.
This commit is contained in:
Andreas Kling
2020-03-15 15:25:43 +01:00
parent f1f14945cf
commit 23b1d97b0d
8 changed files with 114 additions and 0 deletions

View File

@@ -89,6 +89,7 @@ public:
}
Object* string_prototype() { return m_string_prototype; }
Object* object_prototype() { return m_object_prototype; }
private:
Heap m_heap;
@@ -98,6 +99,7 @@ private:
Object* m_global_object { nullptr };
Object* m_string_prototype { nullptr };
Object* m_object_prototype { nullptr };
};
}