mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-29 20:59:00 +00:00
LibJS: Add ModuleWithSpecifier for LoadedModules
This patch adds ModuleWithSpecifier as the record type to be used in the LoadedModules field of Realm, Script and Cyclic Module Records.
This commit is contained in:
parent
7c7ca7f230
commit
d60e8c9df5
Notes:
sideshowbarker
2024-07-16 23:52:22 +09:00
Author: https://github.com/networkException
Commit: d60e8c9df5
Pull-request: https://github.com/SerenityOS/serenity/pull/21700
Issue: https://github.com/SerenityOS/serenity/issues/21009
Reviewed-by: https://github.com/awesomekling
2 changed files with 8 additions and 0 deletions
|
@ -222,6 +222,7 @@ enum class DeclarationKind;
|
||||||
struct AlreadyResolved;
|
struct AlreadyResolved;
|
||||||
struct JobCallback;
|
struct JobCallback;
|
||||||
struct ModuleRequest;
|
struct ModuleRequest;
|
||||||
|
struct ModuleWithSpecifier;
|
||||||
|
|
||||||
// Not included in JS_ENUMERATE_NATIVE_OBJECTS due to missing distinct prototype
|
// Not included in JS_ENUMERATE_NATIVE_OBJECTS due to missing distinct prototype
|
||||||
class ProxyObject;
|
class ProxyObject;
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2021-2022, David Tuin <davidot@serenityos.org>
|
* Copyright (c) 2021-2022, David Tuin <davidot@serenityos.org>
|
||||||
|
* Copyright (c) 2023, networkException <networkexception@serenityos.org>
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: BSD-2-Clause
|
* SPDX-License-Identifier: BSD-2-Clause
|
||||||
*/
|
*/
|
||||||
|
@ -8,9 +9,15 @@
|
||||||
|
|
||||||
#include <AK/DeprecatedFlyString.h>
|
#include <AK/DeprecatedFlyString.h>
|
||||||
#include <AK/Vector.h>
|
#include <AK/Vector.h>
|
||||||
|
#include <LibJS/Module.h>
|
||||||
|
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
|
struct ModuleWithSpecifier {
|
||||||
|
DeprecatedString specifier; // [[Specifier]]
|
||||||
|
NonnullGCPtr<Module> module; // [[Module]]
|
||||||
|
};
|
||||||
|
|
||||||
// 2.9 ModuleRequest Records, https://tc39.es/proposal-import-assertions/#sec-modulerequest-record
|
// 2.9 ModuleRequest Records, https://tc39.es/proposal-import-assertions/#sec-modulerequest-record
|
||||||
struct ModuleRequest {
|
struct ModuleRequest {
|
||||||
struct Assertion {
|
struct Assertion {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue