1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:38:11 +00:00

LibJS: Make PrimitiveString::create() infallible

Work towards #20449.
This commit is contained in:
Andreas Kling 2023-08-08 18:25:57 +02:00
parent b7b02693b9
commit 1a27c525d5
69 changed files with 185 additions and 198 deletions

View file

@ -40,7 +40,7 @@ void JSONObject::initialize(Realm& realm)
define_native_function(realm, vm.names.parse, parse, 2, attr);
// 25.5.3 JSON [ @@toStringTag ], https://tc39.es/ecma262/#sec-json-@@tostringtag
define_direct_property(vm.well_known_symbol_to_string_tag(), MUST(PrimitiveString::create(vm, "JSON"sv)), Attribute::Configurable);
define_direct_property(vm.well_known_symbol_to_string_tag(), PrimitiveString::create(vm, "JSON"_string), Attribute::Configurable);
}
// 25.5.2 JSON.stringify ( value [ , replacer [ , space ] ] ), https://tc39.es/ecma262/#sec-json.stringify