mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-24 09:52:31 +00:00
LibWeb/WebAssembly: Implement Module::exports(module)
This commit is contained in:
parent
f984c1cc51
commit
95cc2bd810
Notes:
github-actions[bot]
2025-04-22 14:45:04 +00:00
Author: https://github.com/alimpfard
Commit: 95cc2bd810
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4423
Reviewed-by: https://github.com/ADKaster ✅
3 changed files with 36 additions and 1 deletions
|
@ -29,6 +29,11 @@ struct ModuleImportDescriptor {
|
|||
Bindings::ImportExportKind kind;
|
||||
};
|
||||
|
||||
struct ModuleExportDescriptor {
|
||||
String name;
|
||||
Bindings::ImportExportKind kind;
|
||||
};
|
||||
|
||||
class Module : public Bindings::PlatformObject {
|
||||
WEB_PLATFORM_OBJECT(Module, Bindings::PlatformObject);
|
||||
GC_DECLARE_ALLOCATOR(Module);
|
||||
|
@ -36,6 +41,7 @@ class Module : public Bindings::PlatformObject {
|
|||
public:
|
||||
static WebIDL::ExceptionOr<GC::Ref<Module>> construct_impl(JS::Realm&, GC::Root<WebIDL::BufferSource>& bytes);
|
||||
static WebIDL::ExceptionOr<Vector<ModuleImportDescriptor>> imports(JS::VM&, GC::Ref<Module>);
|
||||
static WebIDL::ExceptionOr<Vector<ModuleExportDescriptor>> exports(JS::VM&, GC::Ref<Module>);
|
||||
|
||||
NonnullRefPtr<Detail::CompiledWebAssemblyModule> compiled_module() const { return m_compiled_module; }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue