mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 14:45:07 +00:00
LibJS: Constructor function's "prototype" property should be writable
This matches other engines.
This commit is contained in:
parent
01c8765519
commit
2e4832c3da
3 changed files with 12 additions and 2 deletions
|
@ -759,7 +759,7 @@ Value ClassExpression::execute(Interpreter& interpreter, GlobalObject& global_ob
|
|||
prototype->define_property(vm.names.constructor, class_constructor, 0);
|
||||
if (interpreter.exception())
|
||||
return {};
|
||||
class_constructor->define_property(vm.names.prototype, prototype, 0);
|
||||
class_constructor->define_property(vm.names.prototype, prototype, Attribute::Writable);
|
||||
if (interpreter.exception())
|
||||
return {};
|
||||
class_constructor->set_prototype(super_constructor.is_null() ? global_object.function_prototype() : &super_constructor.as_object());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue