diff --git a/Userland/Libraries/LibJS/Runtime/Completion.h b/Userland/Libraries/LibJS/Runtime/Completion.h index 96dbd62a3a..6c0e51c346 100644 --- a/Userland/Libraries/LibJS/Runtime/Completion.h +++ b/Userland/Libraries/LibJS/Runtime/Completion.h @@ -332,6 +332,12 @@ public: [[nodiscard]] ValueType release_value() { return m_value.release_value(); } Completion release_error() { return m_throw_completion.release_value(); } + ValueType release_allocated_value_but_fixme_should_propagate_errors() + { + VERIFY(!is_error()); + return release_value(); + } + private: Optional m_throw_completion; Optional m_value;