mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 04:58:13 +00:00
LibJS: Make ScriptOrModule use WeakPtr instead of raw pointers
This commit is contained in:
parent
6ee597369d
commit
85cf80507f
9 changed files with 23 additions and 18 deletions
|
@ -89,7 +89,7 @@ ThrowCompletionOr<Promise*> JS::SyntheticModule::evaluate(VM& vm)
|
|||
module_context.realm = &realm();
|
||||
|
||||
// 5. Set the ScriptOrModule of moduleContext to module.
|
||||
module_context.script_or_module = this;
|
||||
module_context.script_or_module = this->make_weak_ptr();
|
||||
|
||||
// 6. Set the VariableEnvironment of moduleContext to module.[[Environment]].
|
||||
module_context.variable_environment = environment();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue