mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 11:49:44 +00:00
LibJS+LibWeb: Pass function metadata collected in parsing using a struct
By using separate struct we can avoid updating AST node and ECMAScriptFunctionObject constructors every time there is a need to add or remove some additional information colllected during parsing.
This commit is contained in:
parent
99f6528009
commit
e934132442
Notes:
sideshowbarker
2024-07-17 09:49:48 +09:00
Author: https://github.com/kalenikaliaksandr
Commit: e934132442
Pull-request: https://github.com/SerenityOS/serenity/pull/24414
12 changed files with 75 additions and 73 deletions
|
@ -486,7 +486,7 @@ WebIDL::CallbackType* EventTarget::get_current_value_of_event_handler(FlyString
|
|||
// 6. Return scope. (NOTE: Not necessary)
|
||||
|
||||
auto function = JS::ECMAScriptFunctionObject::create(realm, name.to_deprecated_fly_string(), builder.to_byte_string(), program->body(), program->parameters(), program->function_length(), program->local_variables_names(), scope, nullptr, JS::FunctionKind::Normal, program->is_strict_mode(),
|
||||
program->uses_this_from_environment(), program->might_need_arguments_object(), is_arrow_function);
|
||||
program->parsing_insights(), is_arrow_function);
|
||||
|
||||
// 10. Remove settings object's realm execution context from the JavaScript execution context stack.
|
||||
VERIFY(vm.execution_context_stack().last() == &settings_object.realm_execution_context());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue