1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-20 18:05:07 +00:00

LibWeb: Rename "result" => "evaluation_status" in ClassicScript::run()

This matches the variable name used in the spec.
This commit is contained in:
Andreas Kling 2022-02-07 14:54:41 +01:00
parent a286b1a6af
commit 8c3942d90c

View file

@ -74,17 +74,17 @@ JS::Value ClassicScript::run(RethrowErrors rethrow_errors)
// 6. Otherwise, set evaluationStatus to ScriptEvaluation(script's record). // 6. Otherwise, set evaluationStatus to ScriptEvaluation(script's record).
auto interpreter = JS::Interpreter::create_with_existing_realm(m_script_record->realm()); auto interpreter = JS::Interpreter::create_with_existing_realm(m_script_record->realm());
auto result = interpreter->run(*m_script_record); auto evaluation_status = interpreter->run(*m_script_record);
// FIXME: If ScriptEvaluation does not complete because the user agent has aborted the running script, leave evaluationStatus as null. // FIXME: If ScriptEvaluation does not complete because the user agent has aborted the running script, leave evaluationStatus as null.
dbgln_if(HTML_SCRIPT_DEBUG, "ClassicScript: Finished running script {}, Duration: {}ms", filename(), timer.elapsed()); dbgln_if(HTML_SCRIPT_DEBUG, "ClassicScript: Finished running script {}, Duration: {}ms", filename(), timer.elapsed());
if (result.is_error()) { if (evaluation_status.is_error()) {
// FIXME: Propagate error according to the spec. // FIXME: Propagate error according to the spec.
interpreter->vm().clear_exception(); interpreter->vm().clear_exception();
return {}; return {};
} }
return result.value(); return evaluation_status.value();
} }
ClassicScript::ClassicScript(AK::URL base_url, String filename) ClassicScript::ClassicScript(AK::URL base_url, String filename)