From bfec16ce46207f640d75e6b7c86a0164e4f01014 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 26 Sep 2021 02:05:54 +0200 Subject: [PATCH] LibWeb: Remove nonsensical assignment in script-became-ready callback We don't need to set m_script_ready in the callback that gets invoked precisely because m_script_ready has been set. :^) --- Userland/Libraries/LibWeb/HTML/HTMLScriptElement.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Userland/Libraries/LibWeb/HTML/HTMLScriptElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLScriptElement.cpp index 39a017249f6..744d9467c44 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLScriptElement.cpp +++ b/Userland/Libraries/LibWeb/HTML/HTMLScriptElement.cpp @@ -380,10 +380,8 @@ void HTMLScriptElement::prepare_script() // 1. If the element is not now the first element in the list of scripts // that will execute in order as soon as possible to which it was added above, // then mark the element as ready but return without executing the script yet. - if (this != &m_preparation_time_document->scripts_to_execute_as_soon_as_possible().first()) { - m_script_ready = true; + if (this != &m_preparation_time_document->scripts_to_execute_as_soon_as_possible().first()) return; - } for (;;) { // 2. Execution: Execute the script block corresponding to the first script element