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.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/NativeFunction.h b/Userland/Libraries/LibJS/Runtime/NativeFunction.h
index d88d388ce8..05b1002d40 100644
--- a/Userland/Libraries/LibJS/Runtime/NativeFunction.h
+++ b/Userland/Libraries/LibJS/Runtime/NativeFunction.h
@@ -15,9 +15,9 @@ class NativeFunction : public FunctionObject {
JS_OBJECT(NativeFunction, FunctionObject);
public:
- static NativeFunction* create(GlobalObject&, const FlyString& name, Function<Value(VM&, GlobalObject&)>);
+ static NativeFunction* create(GlobalObject&, const FlyString& name, Function<ThrowCompletionOr<Value>(VM&, GlobalObject&)>);
- explicit NativeFunction(FlyString name, Function<Value(VM&, GlobalObject&)>, Object& prototype);
+ explicit NativeFunction(FlyString name, Function<ThrowCompletionOr<Value>(VM&, GlobalObject&)>, Object& prototype);
virtual void initialize(GlobalObject&) override { }
virtual ~NativeFunction() override;
@@ -42,7 +42,7 @@ private:
virtual bool is_native_function() const final { return true; }
FlyString m_name;
- Function<Value(VM&, GlobalObject&)> m_native_function;
+ Function<ThrowCompletionOr<Value>(VM&, GlobalObject&)> m_native_function;
Realm* m_realm { nullptr };
};