LibWeb: Simplify OOM exception handling in ImportMap

In some cases by crashing on OOM, and in others removing strange use of
String::formatted altogther.
This commit is contained in:
Shannon Booth 2024-12-03 20:50:11 +13:00 committed by Sam Atkins
parent bd2f794873
commit d7ac0601ab
Notes: github-actions[bot] 2024-12-04 16:48:19 +00:00
2 changed files with 15 additions and 19 deletions

View file

@ -40,7 +40,7 @@ private:
};
WebIDL::ExceptionOr<ImportMap> parse_import_map_string(JS::Realm& realm, ByteString const& input, URL::URL base_url);
WebIDL::ExceptionOr<Optional<DeprecatedFlyString>> normalise_specifier_key(JS::Realm& realm, DeprecatedFlyString specifier_key, URL::URL base_url);
Optional<DeprecatedFlyString> normalise_specifier_key(JS::Realm& realm, DeprecatedFlyString specifier_key, URL::URL base_url);
WebIDL::ExceptionOr<ModuleSpecifierMap> sort_and_normalise_module_specifier_map(JS::Realm& realm, JS::Object& original_map, URL::URL base_url);
WebIDL::ExceptionOr<HashMap<URL::URL, ModuleSpecifierMap>> sort_and_normalise_scopes(JS::Realm& realm, JS::Object& original_map, URL::URL base_url);
WebIDL::ExceptionOr<ModuleIntegrityMap> normalize_module_integrity_map(JS::Realm& realm, JS::Object& original_map, URL::URL base_url);