Explorar el Código

LibJS: Remove redundant abrupt completion check

A throw completion is always an abrupt completion, no need to check :^)
Linus Groh hace 3 años
padre
commit
032e6a2d28
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      Userland/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.cpp

+ 1 - 1
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);
             }