mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-13 05:41:51 +00:00
LibJS: Replace PropertyKey(char[]) with PropertyKey(FlyString)
...and deal with the fallout.
This commit is contained in:
parent
d7908dbff5
commit
53da8893ac
Notes:
github-actions[bot]
2025-03-24 22:28:43 +00:00
Author: https://github.com/awesomekling
Commit: 53da8893ac
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4067
Reviewed-by: https://github.com/trflynn89
55 changed files with 254 additions and 251 deletions
|
@ -34,8 +34,8 @@ WebIDL::ExceptionOr<ImportMap> parse_import_map_string(JS::Realm& realm, ByteStr
|
|||
ModuleSpecifierMap sorted_and_normalised_imports;
|
||||
|
||||
// 4. If parsed["imports"] exists, then:
|
||||
if (TRY(parsed_object.has_property("imports"))) {
|
||||
auto imports = TRY(parsed_object.get("imports"));
|
||||
if (TRY(parsed_object.has_property("imports"_fly_string))) {
|
||||
auto imports = TRY(parsed_object.get("imports"_fly_string));
|
||||
|
||||
// If parsed["imports"] is not an ordered map, then throw a TypeError indicating that the value for the "imports" top-level key needs to be a JSON object.
|
||||
if (!imports.is_object())
|
||||
|
@ -49,8 +49,8 @@ WebIDL::ExceptionOr<ImportMap> parse_import_map_string(JS::Realm& realm, ByteStr
|
|||
HashMap<URL::URL, ModuleSpecifierMap> sorted_and_normalised_scopes;
|
||||
|
||||
// 6. If parsed["scopes"] exists, then:
|
||||
if (TRY(parsed_object.has_property("scopes"))) {
|
||||
auto scopes = TRY(parsed_object.get("scopes"));
|
||||
if (TRY(parsed_object.has_property("scopes"_fly_string))) {
|
||||
auto scopes = TRY(parsed_object.get("scopes"_fly_string));
|
||||
|
||||
// If parsed["scopes"] is not an ordered map, then throw a TypeError indicating that the value for the "scopes" top-level key needs to be a JSON object.
|
||||
if (!scopes.is_object())
|
||||
|
@ -64,8 +64,8 @@ WebIDL::ExceptionOr<ImportMap> parse_import_map_string(JS::Realm& realm, ByteStr
|
|||
ModuleIntegrityMap normalised_integrity;
|
||||
|
||||
// 8. If parsed["integrity"] exists, then:
|
||||
if (TRY(parsed_object.has_property("integrity"))) {
|
||||
auto integrity = TRY(parsed_object.get("integrity"));
|
||||
if (TRY(parsed_object.has_property("integrity"_fly_string))) {
|
||||
auto integrity = TRY(parsed_object.get("integrity"_fly_string));
|
||||
|
||||
// 1. If parsed["integrity"] is not an ordered map, then throw a TypeError indicating that the value for the "integrity" top-level key needs to be a JSON object.
|
||||
if (!integrity.is_object())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue