mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
LibJS: Convert new_function_environment() to NonnullGCPtr
This commit is contained in:
parent
111a38c464
commit
208be8b86d
Notes:
sideshowbarker
2024-07-17 03:06:06 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/208be8b86d Pull-request: https://github.com/SerenityOS/serenity/pull/16521
3 changed files with 3 additions and 3 deletions
|
@ -407,7 +407,7 @@ NonnullGCPtr<ObjectEnvironment> new_object_environment(Object& object, bool is_w
|
|||
}
|
||||
|
||||
// 9.1.2.4 NewFunctionEnvironment ( F, newTarget ), https://tc39.es/ecma262/#sec-newfunctionenvironment
|
||||
FunctionEnvironment* new_function_environment(ECMAScriptFunctionObject& function, Object* new_target)
|
||||
NonnullGCPtr<FunctionEnvironment> new_function_environment(ECMAScriptFunctionObject& function, Object* new_target)
|
||||
{
|
||||
auto& heap = function.heap();
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ namespace JS {
|
|||
|
||||
NonnullGCPtr<DeclarativeEnvironment> new_declarative_environment(Environment&);
|
||||
NonnullGCPtr<ObjectEnvironment> new_object_environment(Object&, bool is_with_environment, Environment*);
|
||||
FunctionEnvironment* new_function_environment(ECMAScriptFunctionObject&, Object* new_target);
|
||||
NonnullGCPtr<FunctionEnvironment> new_function_environment(ECMAScriptFunctionObject&, Object* new_target);
|
||||
PrivateEnvironment* new_private_environment(VM& vm, PrivateEnvironment* outer);
|
||||
Environment& get_this_environment(VM&);
|
||||
bool can_be_held_weakly(Value);
|
||||
|
|
|
@ -622,7 +622,7 @@ ThrowCompletionOr<void> ECMAScriptFunctionObject::prepare_for_ordinary_call(Exec
|
|||
callee_context.script_or_module = m_script_or_module;
|
||||
|
||||
// 7. Let localEnv be NewFunctionEnvironment(F, newTarget).
|
||||
auto* local_environment = new_function_environment(*this, new_target);
|
||||
auto local_environment = new_function_environment(*this, new_target);
|
||||
|
||||
// 8. Set the LexicalEnvironment of calleeContext to localEnv.
|
||||
callee_context.lexical_environment = local_environment;
|
||||
|
|
Loading…
Reference in a new issue