diff options
author | Timothy Flynn <trflynn89@pm.me> | 2023-01-28 12:33:35 -0500 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2023-01-29 00:02:45 +0000 |
commit | 2692db869963ed10947b05f13eade5fcbd5951dc (patch) | |
tree | ef12b9e76ff4edb64571819643a92d8e6c33a2fe /Userland/Libraries/LibJS/Runtime/FunctionObject.h | |
parent | 1c1b902a6a0c1c7017fdc6d9748018317a554c9b (diff) | |
download | serenity-2692db869963ed10947b05f13eade5fcbd5951dc.zip |
LibJS+Everywhere: Allow Cell::initialize overrides to throw OOM errors
Note that as of this commit, there aren't any such throwers, and the
call site in Heap::allocate will drop exceptions on the floor. This
commit only serves to change the declaration of the overrides, make sure
they return an empty value, and to propagate OOM errors frm their base
initialize invocations.
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/FunctionObject.h')
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/FunctionObject.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/FunctionObject.h b/Userland/Libraries/LibJS/Runtime/FunctionObject.h index 6fc6991a79..ab36f95dcd 100644 --- a/Userland/Libraries/LibJS/Runtime/FunctionObject.h +++ b/Userland/Libraries/LibJS/Runtime/FunctionObject.h @@ -20,7 +20,7 @@ class FunctionObject : public Object { public: virtual ~FunctionObject() = default; - virtual void initialize(Realm&) override { } + virtual ThrowCompletionOr<void> initialize(Realm&) override { return {}; } // Table 7: Additional Essential Internal Methods of Function Objects, https://tc39.es/ecma262/#table-additional-essential-internal-methods-of-function-objects |