mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 02:05:07 +02:00
LibJS: Remove redundant abrupt completion check
A throw completion is always an abrupt completion, no need to check :^)
This commit is contained in:
Notes:
sideshowbarker
2024-07-17 21:44:47 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/032e6a2d281 Pull-request: https://github.com/SerenityOS/serenity/pull/11513 Reviewed-by: https://github.com/davidot ✅
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user