mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-03 13:02:09 +02:00
LibJS: Replace GlobalObject with VM in remaining AOs [Part 19/19]
This commit is contained in:
Notes:
sideshowbarker
2024-07-17 07:53:23 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/56b2ae5ac0 Pull-request: https://github.com/SerenityOS/serenity/pull/14973 Reviewed-by: https://github.com/davidot ✅
@@ -402,7 +402,7 @@ ThrowCompletionOr<void> SourceTextModule::initialize_environment(VM& vm)
|
||||
// Note: We're already working on that one.
|
||||
|
||||
// 17. Push moduleContext onto the execution context stack; moduleContext is now the running execution context.
|
||||
TRY(vm.push_execution_context(m_execution_context, realm().global_object()));
|
||||
TRY(vm.push_execution_context(m_execution_context, {}));
|
||||
|
||||
// 18. Let code be module.[[ECMAScriptCode]].
|
||||
|
||||
@@ -655,7 +655,7 @@ ThrowCompletionOr<void> SourceTextModule::execute_module(VM& vm, Optional<Promis
|
||||
// a. Assert: capability is not present.
|
||||
VERIFY(!capability.has_value());
|
||||
// b. Push moduleContext onto the execution context stack; moduleContext is now the running execution context.
|
||||
TRY(vm.push_execution_context(module_context, realm().global_object()));
|
||||
TRY(vm.push_execution_context(module_context, {}));
|
||||
|
||||
// c. Let result be the result of evaluating module.[[ECMAScriptCode]].
|
||||
auto result = m_ecmascript_code->execute(vm.interpreter());
|
||||
|
||||
Reference in New Issue
Block a user