summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Runtime/JSONObject.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-10-24 16:01:24 +0200
committerAndreas Kling <kling@serenityos.org>2021-10-24 17:18:07 +0200
commit398c181c799f728739c1ee2184b8638554b3353c (patch)
treef3359393325fc8da02ecb78981a1f87c458246f2 /Userland/Libraries/LibJS/Runtime/JSONObject.cpp
parent715e7fada8ed00a7680bb8f4ed65afd3026d3d59 (diff)
downloadserenity-398c181c799f728739c1ee2184b8638554b3353c.zip
LibJS: Rename PropertyName to PropertyKey
Let's use the same name as the spec. :^)
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/JSONObject.cpp')
-rw-r--r--Userland/Libraries/LibJS/Runtime/JSONObject.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/JSONObject.cpp b/Userland/Libraries/LibJS/Runtime/JSONObject.cpp
index 4993d382eb..cc990fd28b 100644
--- a/Userland/Libraries/LibJS/Runtime/JSONObject.cpp
+++ b/Userland/Libraries/LibJS/Runtime/JSONObject.cpp
@@ -129,7 +129,7 @@ JS_DEFINE_OLD_NATIVE_FUNCTION(JSONObject::stringify)
}
// 25.5.2.1 SerializeJSONProperty ( state, key, holder ), https://tc39.es/ecma262/#sec-serializejsonproperty
-String JSONObject::serialize_json_property(GlobalObject& global_object, StringifyState& state, const PropertyName& key, Object* holder)
+String JSONObject::serialize_json_property(GlobalObject& global_object, StringifyState& state, const PropertyKey& key, Object* holder)
{
auto& vm = global_object.vm();
auto value = TRY_OR_DISCARD(holder->get(key));
@@ -200,7 +200,7 @@ String JSONObject::serialize_json_object(GlobalObject& global_object, StringifyS
state.indent = String::formatted("{}{}", state.indent, state.gap);
Vector<String> property_strings;
- auto process_property = [&](const PropertyName& key) {
+ auto process_property = [&](const PropertyKey& key) {
if (key.is_symbol())
return;
auto serialized_property_string = serialize_json_property(global_object, state, key, &object);
@@ -437,7 +437,7 @@ Array* JSONObject::parse_json_array(GlobalObject& global_object, const JsonArray
}
// 25.5.1.1 InternalizeJSONProperty ( holder, name, reviver ), https://tc39.es/ecma262/#sec-internalizejsonproperty
-Value JSONObject::internalize_json_property(GlobalObject& global_object, Object* holder, PropertyName const& name, FunctionObject& reviver)
+Value JSONObject::internalize_json_property(GlobalObject& global_object, Object* holder, PropertyKey const& name, FunctionObject& reviver)
{
auto& vm = global_object.vm();
auto value = TRY_OR_DISCARD(holder->get(name));
@@ -445,7 +445,7 @@ Value JSONObject::internalize_json_property(GlobalObject& global_object, Object*
auto is_array = TRY_OR_DISCARD(value.is_array(global_object));
auto& value_object = value.as_object();
- auto process_property = [&](const PropertyName& key) -> ThrowCompletionOr<void> {
+ auto process_property = [&](const PropertyKey& key) -> ThrowCompletionOr<void> {
auto element = internalize_json_property(global_object, &value_object, key, reviver);
if (auto* exception = vm.exception())
return throw_completion(exception->value());