mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-11 13:36:13 +03:00
LibWasm: Make sure no duplicate export names are possible
This commit is contained in:
parent
e64ac8c177
commit
3d7c824607
Notes:
sideshowbarker
2024-07-17 03:03:37 +09:00
Author: https://github.com/dzfrias Commit: https://github.com/LadybirdBrowser/ladybird/commit/3d7c824607 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/134
@ -25,9 +25,10 @@ ErrorOr<void, ValidationError> Validator::validate(Module& module)
|
||||
if (result.is_error())
|
||||
return;
|
||||
for (auto& export_ : section.entries()) {
|
||||
if (seen_export_names.try_set(export_.name()).release_value_but_fixme_should_propagate_errors() != AK::HashSetResult::InsertedNewEntry)
|
||||
if (seen_export_names.try_set(export_.name()).release_value_but_fixme_should_propagate_errors() != AK::HashSetResult::InsertedNewEntry) {
|
||||
result = Errors::duplicate_export_name(export_.name());
|
||||
return;
|
||||
return;
|
||||
}
|
||||
}
|
||||
});
|
||||
if (result.is_error()) {
|
||||
|
Loading…
Reference in New Issue
Block a user