summaryrefslogtreecommitdiff
path: root/Userland/Libraries
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2021-10-14 11:11:47 +0100
committerLinus Groh <mail@linusgroh.de>2021-10-14 11:13:05 +0100
commit1b1bf5c3218f9903600dda1a8d4ede1595d40be8 (patch)
tree2bbc386cae75b79bcd51b50d06f206c40b5585cd /Userland/Libraries
parenta48985422c6a614bc89a73dfbda3282433e24116 (diff)
downloadserenity-1b1bf5c3218f9903600dda1a8d4ede1595d40be8.zip
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.
Diffstat (limited to 'Userland/Libraries')
-rw-r--r--Userland/Libraries/LibJS/Runtime/Completion.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/Completion.h b/Userland/Libraries/LibJS/Runtime/Completion.h
index 252d5a3be5..9874d42f8e 100644
--- a/Userland/Libraries/LibJS/Runtime/Completion.h
+++ b/Userland/Libraries/LibJS/Runtime/Completion.h
@@ -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, {} };
}