diff options
author | Andreas Kling <kling@serenityos.org> | 2021-10-24 16:01:24 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-10-24 17:18:07 +0200 |
commit | 398c181c799f728739c1ee2184b8638554b3353c (patch) | |
tree | f3359393325fc8da02ecb78981a1f87c458246f2 /Userland/Libraries/LibJS/Runtime/StringObject.cpp | |
parent | 715e7fada8ed00a7680bb8f4ed65afd3026d3d59 (diff) | |
download | serenity-398c181c799f728739c1ee2184b8638554b3353c.zip |
LibJS: Rename PropertyName to PropertyKey
Let's use the same name as the spec. :^)
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/StringObject.cpp')
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/StringObject.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/StringObject.cpp b/Userland/Libraries/LibJS/Runtime/StringObject.cpp index f061abedbf..83ca4a0ed1 100644 --- a/Userland/Libraries/LibJS/Runtime/StringObject.cpp +++ b/Userland/Libraries/LibJS/Runtime/StringObject.cpp @@ -44,7 +44,7 @@ void StringObject::visit_edges(Cell::Visitor& visitor) } // 10.4.3.5 StringGetOwnProperty ( S, P ),https://tc39.es/ecma262/#sec-stringgetownproperty -static Optional<PropertyDescriptor> string_get_own_property(GlobalObject& global_object, StringObject const& string, PropertyName const& property_name) +static Optional<PropertyDescriptor> string_get_own_property(GlobalObject& global_object, StringObject const& string, PropertyKey const& property_name) { // 1. Assert: S is an Object that has a [[StringData]] internal slot. // 2. Assert: IsPropertyKey(P) is true. @@ -52,7 +52,7 @@ static Optional<PropertyDescriptor> string_get_own_property(GlobalObject& global // 3. If Type(P) is not String, return undefined. // NOTE: The spec only uses string and symbol keys, and later coerces to numbers - - // this is not the case for PropertyName, so '!property_name.is_string()' would be wrong. + // this is not the case for PropertyKey, so '!property_name.is_string()' would be wrong. if (property_name.is_symbol()) return {}; @@ -92,7 +92,7 @@ static Optional<PropertyDescriptor> string_get_own_property(GlobalObject& global } // 10.4.3.1 [[GetOwnProperty]] ( P ), https://tc39.es/ecma262/#sec-string-exotic-objects-getownproperty-p -ThrowCompletionOr<Optional<PropertyDescriptor>> StringObject::internal_get_own_property(PropertyName const& property_name) const +ThrowCompletionOr<Optional<PropertyDescriptor>> StringObject::internal_get_own_property(PropertyKey const& property_name) const { // Assert: IsPropertyKey(P) is true. @@ -108,7 +108,7 @@ ThrowCompletionOr<Optional<PropertyDescriptor>> StringObject::internal_get_own_p } // 10.4.3.2 [[DefineOwnProperty]] ( P, Desc ), https://tc39.es/ecma262/#sec-string-exotic-objects-defineownproperty-p-desc -ThrowCompletionOr<bool> StringObject::internal_define_own_property(PropertyName const& property_name, PropertyDescriptor const& property_descriptor) +ThrowCompletionOr<bool> StringObject::internal_define_own_property(PropertyKey const& property_name, PropertyDescriptor const& property_descriptor) { // 1. Assert: IsPropertyKey(P) is true. VERIFY(property_name.is_valid()); |