From 1b1bf5c3218f9903600dda1a8d4ede1595d40be8 Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Thu, 14 Oct 2021 11:11:47 +0100 Subject: [PATCH] LibJS: Change normal_completion() parameter to Optional 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 instead. --- Userland/Libraries/LibJS/Runtime/Completion.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { return { Completion::Type::Normal, value, {} }; }