summaryrefslogtreecommitdiff
path: root/Libraries/LibJS/Runtime/FunctionConstructor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Libraries/LibJS/Runtime/FunctionConstructor.cpp')
-rw-r--r--Libraries/LibJS/Runtime/FunctionConstructor.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/Libraries/LibJS/Runtime/FunctionConstructor.cpp b/Libraries/LibJS/Runtime/FunctionConstructor.cpp
index 687db60748..69ae5bfecf 100644
--- a/Libraries/LibJS/Runtime/FunctionConstructor.cpp
+++ b/Libraries/LibJS/Runtime/FunctionConstructor.cpp
@@ -35,10 +35,14 @@
namespace JS {
-FunctionConstructor::FunctionConstructor()
- : NativeFunction("Function", *interpreter().global_object().function_prototype())
+FunctionConstructor::FunctionConstructor(GlobalObject& global_object)
+ : NativeFunction("Function", *global_object.function_prototype())
{
- define_property("prototype", interpreter().global_object().function_prototype(), 0);
+}
+
+void FunctionConstructor::initialize(Interpreter&, GlobalObject& global_object)
+{
+ define_property("prototype", global_object.function_prototype(), 0);
define_property("length", Value(1), Attribute::Configurable);
}