1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-28 03:35:09 +00:00

LibJS: Rename ScriptFunction => OrdinaryFunctionObject

These are basically what the spec calls "ordinary function objects",
so let's have the name reflect that. :^)
This commit is contained in:
Andreas Kling 2021-06-27 22:15:58 +02:00
parent ba9d5c4d54
commit c8270dbe2e
17 changed files with 60 additions and 60 deletions

View file

@ -7,7 +7,7 @@
#include <LibJS/Interpreter.h>
#include <LibJS/Parser.h>
#include <LibJS/Runtime/FunctionObject.h>
#include <LibJS/Runtime/ScriptFunction.h>
#include <LibJS/Runtime/OrdinaryFunctionObject.h>
#include <LibProtocol/WebSocket.h>
#include <LibProtocol/WebSocketClient.h>
#include <LibWeb/Bindings/EventWrapper.h>
@ -246,7 +246,7 @@ void WebSocket::set_event_handler_attribute(const FlyString& name, HTML::EventHa
dbgln("Failed to parse script in event handler attribute '{}'", name);
return;
}
auto* function = JS::ScriptFunction::create(script_execution_context()->interpreter().global_object(), name, program->body(), program->parameters(), program->function_length(), nullptr, JS::FunctionKind::Regular, false, false);
auto* function = JS::OrdinaryFunctionObject::create(script_execution_context()->interpreter().global_object(), name, program->body(), program->parameters(), program->function_length(), nullptr, JS::FunctionKind::Regular, false, false);
VERIFY(function);
listener = adopt_ref(*new DOM::EventListener(JS::make_handle(static_cast<JS::FunctionObject*>(function))));
}