mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-24 02:12:09 -05:00
LibJS: Convert new_private_environment() to NonnullGCPtr
This commit is contained in:
parent
208be8b86d
commit
c132064ee9
3 changed files with 3 additions and 3 deletions
|
@ -1852,7 +1852,7 @@ ThrowCompletionOr<ECMAScriptFunctionObject*> ClassExpression::class_definition_e
|
|||
MUST(class_environment->create_immutable_binding(vm, binding_name, true));
|
||||
|
||||
auto* outer_private_environment = vm.running_execution_context().private_environment;
|
||||
auto* class_private_environment = new_private_environment(vm, outer_private_environment);
|
||||
auto class_private_environment = new_private_environment(vm, outer_private_environment);
|
||||
|
||||
for (auto const& element : m_elements) {
|
||||
auto opt_private_name = element.private_bound_identifier();
|
||||
|
|
|
@ -435,7 +435,7 @@ NonnullGCPtr<FunctionEnvironment> new_function_environment(ECMAScriptFunctionObj
|
|||
}
|
||||
|
||||
// 9.2.1.1 NewPrivateEnvironment ( outerPrivEnv ), https://tc39.es/ecma262/#sec-newprivateenvironment
|
||||
PrivateEnvironment* new_private_environment(VM& vm, PrivateEnvironment* outer)
|
||||
NonnullGCPtr<PrivateEnvironment> new_private_environment(VM& vm, PrivateEnvironment* outer)
|
||||
{
|
||||
// 1. Let names be a new empty List.
|
||||
// 2. Return the PrivateEnvironment Record { [[OuterPrivateEnvironment]]: outerPrivEnv, [[Names]]: names }.
|
||||
|
|
|
@ -22,7 +22,7 @@ namespace JS {
|
|||
NonnullGCPtr<DeclarativeEnvironment> new_declarative_environment(Environment&);
|
||||
NonnullGCPtr<ObjectEnvironment> new_object_environment(Object&, bool is_with_environment, Environment*);
|
||||
NonnullGCPtr<FunctionEnvironment> new_function_environment(ECMAScriptFunctionObject&, Object* new_target);
|
||||
PrivateEnvironment* new_private_environment(VM& vm, PrivateEnvironment* outer);
|
||||
NonnullGCPtr<PrivateEnvironment> new_private_environment(VM& vm, PrivateEnvironment* outer);
|
||||
Environment& get_this_environment(VM&);
|
||||
bool can_be_held_weakly(Value);
|
||||
Object* get_super_constructor(VM&);
|
||||
|
|
Loading…
Add table
Reference in a new issue