1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 09:18:11 +00:00

LibJS: Change normal_completion() parameter to Optional<Value>

The Completion constructor `VERIFY()`s that the passed argument is not
an empty Value, so normal_completion({}) would crash (although it's
currently not being used anywhere).
We want to pass an empty Optional<Value> instead.
This commit is contained in:
Linus Groh 2021-10-14 11:11:47 +01:00
parent a48985422c
commit 1b1bf5c321

View file

@ -157,7 +157,7 @@ public:
};
// 6.2.3.2 NormalCompletion ( value ), https://tc39.es/ecma262/#sec-normalcompletion
inline Completion normal_completion(Value value)
inline Completion normal_completion(Optional<Value> value)
{
return { Completion::Type::Normal, value, {} };
}