summaryrefslogtreecommitdiff
path: root/Libraries/LibJS/Runtime/NativeFunction.h
diff options
context:
space:
mode:
authorJack Karamanian <karamanian.jack@gmail.com>2020-06-08 13:31:21 -0500
committerAndreas Kling <kling@serenityos.org>2020-06-29 17:54:54 +0200
commit7533fd8b025937b2a9ab834a6bbee2be7309de8b (patch)
treec6f2a77266260b539468a3b0f9d6d733857dc74c /Libraries/LibJS/Runtime/NativeFunction.h
parenta535d58cac6cfef7c85cd9ee8419189d58560afb (diff)
downloadserenity-7533fd8b025937b2a9ab834a6bbee2be7309de8b.zip
LibJS: Initial class implementation; allow super expressions in object
literal methods; add EnvrionmentRecord fields and methods to LexicalEnvironment Adding EnvrionmentRecord's fields and methods lets us throw an exception when |this| is not initialized, which occurs when the super constructor in a derived class has not yet been called, or when |this| has already been initialized (the super constructor was already called).
Diffstat (limited to 'Libraries/LibJS/Runtime/NativeFunction.h')
-rw-r--r--Libraries/LibJS/Runtime/NativeFunction.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Libraries/LibJS/Runtime/NativeFunction.h b/Libraries/LibJS/Runtime/NativeFunction.h
index f569e382ac..19cb64bd4e 100644
--- a/Libraries/LibJS/Runtime/NativeFunction.h
+++ b/Libraries/LibJS/Runtime/NativeFunction.h
@@ -53,7 +53,7 @@ protected:
private:
virtual bool is_native_function() const override { return true; }
- virtual LexicalEnvironment* create_environment() override final { return nullptr; }
+ virtual LexicalEnvironment* create_environment() override final;
FlyString m_name;
AK::Function<Value(Interpreter&, GlobalObject&)> m_native_function;