mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-24 19:28:48 +00:00
LibJS+LibWeb: Another round of bringing module loading closer to spec
In particular, this patch focuses on: - Updating the old "import assertions" to the new "import attributes" - Allowing realms as module import referrer
This commit is contained in:
parent
82977ab44b
commit
07f567cd9f
Notes:
sideshowbarker
2024-07-17 06:54:15 +09:00
Author: https://github.com/awesomekling
Commit: 07f567cd9f
Pull-request: https://github.com/SerenityOS/serenity/pull/21967
Issue: https://github.com/SerenityOS/serenity/issues/21737
Issue: https://github.com/SerenityOS/serenity/issues/21899
14 changed files with 244 additions and 178 deletions
|
@ -233,8 +233,9 @@ ThrowCompletionOr<Value> shadow_realm_import_value(VM& vm, DeprecatedString spec
|
|||
// 5. Push evalContext onto the execution context stack; evalContext is now the running execution context.
|
||||
TRY(vm.push_execution_context(eval_context, {}));
|
||||
|
||||
// 6. Perform HostImportModuleDynamically(null, specifierString, innerCapability).
|
||||
MUST_OR_THROW_OOM(vm.host_import_module_dynamically(Empty {}, ModuleRequest { move(specifier_string) }, inner_capability));
|
||||
// 6. Let referrer be the Realm component of evalContext.
|
||||
// 7. Perform HostImportModuleDynamically(referrer, specifierString, innerCapability).
|
||||
MUST_OR_THROW_OOM(vm.host_import_module_dynamically(NonnullGCPtr { *eval_context.realm }, ModuleRequest { move(specifier_string) }, inner_capability));
|
||||
|
||||
// 7. Suspend evalContext and remove it from the execution context stack.
|
||||
// NOTE: We don't support this concept yet.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue