diff options
author | Linus Groh <mail@linusgroh.de> | 2021-12-28 17:46:15 +0100 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-01-03 21:50:50 +0100 |
commit | 032e6a2d281008919ef8efd52c0d7b9d1784e60f (patch) | |
tree | acc289e135cd96a48852fdee7984b243eeb0c780 | |
parent | 85f0fc2b83a83c842144018a8643ac471cf0c33f (diff) | |
download | serenity-032e6a2d281008919ef8efd52c0d7b9d1784e60f.zip |
LibJS: Remove redundant abrupt completion check
A throw completion is always an abrupt completion, no need to check :^)
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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); } |