mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 13:17:44 +00:00
LibJS: Convert new_object_environment() to NonnullGCPtr
This commit is contained in:
parent
107e06a396
commit
111a38c464
5 changed files with 5 additions and 5 deletions
|
@ -621,7 +621,7 @@ Completion WithStatement::execute(Interpreter& interpreter) const
|
|||
auto* old_environment = vm.running_execution_context().lexical_environment;
|
||||
|
||||
// 4. Let newEnv be NewObjectEnvironment(obj, true, oldEnv).
|
||||
auto* new_environment = new_object_environment(*object, true, old_environment);
|
||||
auto new_environment = new_object_environment(*object, true, old_environment);
|
||||
|
||||
// 5. Set the running execution context's LexicalEnvironment to newEnv.
|
||||
vm.running_execution_context().lexical_environment = new_environment;
|
||||
|
|
|
@ -394,7 +394,7 @@ NonnullGCPtr<DeclarativeEnvironment> new_declarative_environment(Environment& en
|
|||
}
|
||||
|
||||
// 9.1.2.3 NewObjectEnvironment ( O, W, E ), https://tc39.es/ecma262/#sec-newobjectenvironment
|
||||
ObjectEnvironment* new_object_environment(Object& object, bool is_with_environment, Environment* environment)
|
||||
NonnullGCPtr<ObjectEnvironment> new_object_environment(Object& object, bool is_with_environment, Environment* environment)
|
||||
{
|
||||
auto& heap = object.heap();
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
namespace JS {
|
||||
|
||||
NonnullGCPtr<DeclarativeEnvironment> new_declarative_environment(Environment&);
|
||||
ObjectEnvironment* new_object_environment(Object&, bool is_with_environment, Environment*);
|
||||
NonnullGCPtr<ObjectEnvironment> new_object_environment(Object&, bool is_with_environment, Environment*);
|
||||
FunctionEnvironment* new_function_environment(ECMAScriptFunctionObject&, Object* new_target);
|
||||
PrivateEnvironment* new_private_environment(VM& vm, PrivateEnvironment* outer);
|
||||
Environment& get_this_environment(VM&);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue