summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Runtime/NativeFunction.h
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/NativeFunction.h')
-rw-r--r--Userland/Libraries/LibJS/Runtime/NativeFunction.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/NativeFunction.h b/Userland/Libraries/LibJS/Runtime/NativeFunction.h
index 05b1002d40..d028b629f9 100644
--- a/Userland/Libraries/LibJS/Runtime/NativeFunction.h
+++ b/Userland/Libraries/LibJS/Runtime/NativeFunction.h
@@ -7,6 +7,7 @@
#pragma once
#include <AK/Function.h>
+#include <LibJS/Runtime/Completion.h>
#include <LibJS/Runtime/FunctionObject.h>
namespace JS {
@@ -26,8 +27,8 @@ public:
// Used for [[Call]] / [[Construct]]'s "...result of evaluating F in a manner that conforms to the specification of F".
// Needs to be overridden by all NativeFunctions without an m_native_function.
- virtual Value call();
- virtual Value construct(FunctionObject& new_target);
+ virtual ThrowCompletionOr<Value> call();
+ virtual ThrowCompletionOr<Object*> construct(FunctionObject& new_target);
virtual const FlyString& name() const override { return m_name; };
virtual bool is_strict_mode() const override;