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:
parent
c500ebdcd5
commit
84c9f3e0d0
2 changed files with 14 additions and 5 deletions
|
@ -171,6 +171,8 @@ protected:
|
|||
explicit Object(GlobalObjectTag);
|
||||
Object(ConstructWithoutPrototypeTag, GlobalObject&);
|
||||
|
||||
void set_prototype(Object*);
|
||||
|
||||
// [[Extensible]]
|
||||
bool m_is_extensible { true };
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue