mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
Revert "LibJS: Shrink ExecutionContext by replacing ScriptOrModule …"
… with Cell*.
This reverts commit d3495c62a7.
This commit is contained in:
committed by
Tim Ledbetter
parent
ba8d63556f
commit
36f74ba96c
Notes:
github-actions[bot]
2026-03-11 23:14:19 +00:00
Author: https://github.com/tcl3 Commit: https://github.com/LadybirdBrowser/ladybird/commit/36f74ba96ce Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/8374
@@ -192,7 +192,7 @@ static JS::ExecutionContext* top_most_script_having_execution_context(JS::VM& vm
|
||||
// Here, the topmost script-having execution context is the topmost entry of the JavaScript execution context stack that has a non-null ScriptOrModule component,
|
||||
// or null if there is no such entry in the JavaScript execution context stack.
|
||||
auto execution_context = vm.execution_context_stack().last_matching([&](JS::ExecutionContext* context) {
|
||||
return context->script_or_module != nullptr;
|
||||
return !context->script_or_module.has<Empty>();
|
||||
});
|
||||
|
||||
if (!execution_context.has_value())
|
||||
|
||||
@@ -128,7 +128,7 @@ JS::Promise* JavaScriptModuleScript::run(PreventErrorReporting)
|
||||
auto* module_execution_context = stack.allocate(0, 0, 0);
|
||||
VERIFY(module_execution_context);
|
||||
module_execution_context->realm = &realm;
|
||||
module_execution_context->script_or_module = record;
|
||||
module_execution_context->script_or_module = GC::Ref<JS::Module> { *record };
|
||||
vm().push_execution_context(*module_execution_context);
|
||||
|
||||
// 2. Set evaluationPromise to record.Evaluate().
|
||||
|
||||
Reference in New Issue
Block a user