mirror of
https://github.com/RGBCube/serenity
synced 2025-07-02 23:22:07 +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
|
@ -63,7 +63,7 @@ ThrowCompletionOr<Value> Interpreter::run(Script& script_record)
|
|||
script_context.realm = &script_record.realm();
|
||||
|
||||
// 5. Set the ScriptOrModule of scriptContext to scriptRecord.
|
||||
script_context.script_or_module = &script_record;
|
||||
script_context.script_or_module = script_record.make_weak_ptr();
|
||||
|
||||
// 6. Set the VariableEnvironment of scriptContext to globalEnv.
|
||||
script_context.variable_environment = &global_environment;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue