1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 08:07:34 +00:00

LibJS: Add Object::set_prototype()

This is just factoring out step "9. Set O.[[Prototype]] to V." of
10.1.2 [[SetPrototypeOf]] into its own method so that we don't have to
use internal_set_prototype_of() for setting an object prototype in all
cases.
This commit is contained in:
Linus Groh 2021-10-02 14:20:39 +01:00
parent c500ebdcd5
commit 84c9f3e0d0
2 changed files with 14 additions and 5 deletions

View file

@ -171,6 +171,8 @@ protected:
explicit Object(GlobalObjectTag);
Object(ConstructWithoutPrototypeTag, GlobalObject&);
void set_prototype(Object*);
// [[Extensible]]
bool m_is_extensible { true };