mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
LibWasm: Clean up module sections API
Remove `for_each_section_of_type` in favor of making the module's sections defined as distinct fields. This means it is no longer possible to have two of the same section (which is invalid in WebAssembly, for anything other than custom sections).
This commit is contained in:
committed by
Ali Mohammad Pur
parent
9f24176cac
commit
23cfee2205
@@ -182,7 +182,7 @@ JS::ThrowCompletionOr<NonnullOwnPtr<Wasm::ModuleInstance>> instantiate_module(JS
|
||||
TRY(import_name.type.visit(
|
||||
[&](Wasm::TypeIndex index) -> JS::ThrowCompletionOr<void> {
|
||||
dbgln("Trying to resolve a function {}::{}, type index {}", import_name.module, import_name.name, index.value());
|
||||
auto& type = module.type(index);
|
||||
auto& type = module.type_section().types()[index.value()];
|
||||
// FIXME: IsCallable()
|
||||
if (!import_.is_function())
|
||||
return {};
|
||||
|
||||
Reference in New Issue
Block a user