From 032e6a2d281008919ef8efd52c0d7b9d1784e60f Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Tue, 28 Dec 2021 17:46:15 +0100 Subject: [PATCH] LibJS: Remove redundant abrupt completion check A throw completion is always an abrupt completion, no need to check :^) --- Userland/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.cpp b/Userland/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.cpp index 565a5dee4d..7c255e1f2b 100644 --- a/Userland/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.cpp +++ b/Userland/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.cpp @@ -837,7 +837,7 @@ Completion ECMAScriptFunctionObject::ordinary_call_evaluate_body() auto declaration_result = function_declaration_instantiation(ast_interpreter); // 3. If declResult is not an abrupt completion, then - if (!declaration_result.is_throw_completion() || !declaration_result.throw_completion().is_abrupt()) { + if (!declaration_result.is_throw_completion()) { // a. Perform ! AsyncFunctionStart(promiseCapability, FunctionBody). async_function_start(promise_capability); }