summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/HTML/Scripting
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibWeb/HTML/Scripting')
-rw-r--r--Userland/Libraries/LibWeb/HTML/Scripting/ClassicScript.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/HTML/Scripting/ClassicScript.cpp b/Userland/Libraries/LibWeb/HTML/Scripting/ClassicScript.cpp
index 92c1525dd9..0553dcd741 100644
--- a/Userland/Libraries/LibWeb/HTML/Scripting/ClassicScript.cpp
+++ b/Userland/Libraries/LibWeb/HTML/Scripting/ClassicScript.cpp
@@ -69,9 +69,15 @@ JS::Value ClassicScript::run(RethrowErrors rethrow_errors)
(void)rethrow_errors;
auto timer = Core::ElapsedTimer::start_new();
+
+ // 6. Otherwise, set evaluationStatus to ScriptEvaluation(script's record).
+ // FIXME: Interpreter::run doesn't currently return a JS::Completion.
auto interpreter = JS::Interpreter::create_with_existing_realm(m_script_record->realm());
- auto result = interpreter->run(interpreter->global_object(), m_script_record->parse_node());
+ auto result = interpreter->run(*m_script_record);
+
+ // FIXME: If ScriptEvaluation does not complete because the user agent has aborted the running script, leave evaluationStatus as null.
+
dbgln("ClassicScript: Finished running script {}, Duration: {}ms", filename(), timer.elapsed());
if (result.is_error()) {
// FIXME: Propagate error according to the spec.