LibJS: Remove PropertyKey::is_valid() method

This method was being used to check for invalid `PropertyKey`s.
Since invalid `PropertyKey`s are no longer created, and since the
associated method has also been removed in the latest edition of
ECMA-262, the method can now be removed here as well.

While we are removing all its calls, lets also update any surrounding
spec comments to the current latest edition, where possible.
This commit is contained in:
Jonne Ransijn
2024-11-01 23:31:36 +01:00
committed by Andreas Kling
parent bc05f6303f
commit 0080f399c7
9 changed files with 26 additions and 99 deletions

View File

@@ -281,8 +281,6 @@ ThrowCompletionOr<bool> Array::internal_define_own_property(PropertyKey const& p
{
auto& vm = this->vm();
VERIFY(property_key.is_valid());
// 1. If P is "length", then
if (property_key.is_string() && property_key.as_string() == vm.names.length.as_string()) {
// a. Return ? ArraySetLength(A, Desc).