summaryrefslogtreecommitdiff
path: root/Libraries/LibJS/AST.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-11-29 18:01:59 +0100
committerAndreas Kling <kling@serenityos.org>2020-11-29 19:49:27 +0100
commit2e4832c3da770357c1a45a5f4c5af5ee4b32c7ad (patch)
tree65d5fea92f5c4b6178abd8362ec516557e0f29f1 /Libraries/LibJS/AST.cpp
parent01c87655197fd25362a8eebb40dd1365d91f865b (diff)
downloadserenity-2e4832c3da770357c1a45a5f4c5af5ee4b32c7ad.zip
LibJS: Constructor function's "prototype" property should be writable
This matches other engines.
Diffstat (limited to 'Libraries/LibJS/AST.cpp')
-rw-r--r--Libraries/LibJS/AST.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Libraries/LibJS/AST.cpp b/Libraries/LibJS/AST.cpp
index a78ce9192f..a6cb719120 100644
--- a/Libraries/LibJS/AST.cpp
+++ b/Libraries/LibJS/AST.cpp
@@ -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());