1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 17:57:34 +00:00

LibJS: Replace all uses of to_size_t() and remove it :^)

Yay for more spec compliance! This is pretty easy as everything using
to_size_t() should just be using one of the other abstract operations we
already have implemented.
This allows us to get rid of get_length() in ArrayPrototype, which is
basically a slightly incorrect implementation of length_of_array_like(),
and then finally remove to_size_t()!
Also fixes a couple of "argument is undefined" vs "argument isn't given"
issues along the way.
This commit is contained in:
Linus Groh 2021-01-10 21:13:58 +01:00 committed by Andreas Kling
parent 9be0b664e3
commit f369229770
6 changed files with 47 additions and 83 deletions

View file

@ -256,7 +256,6 @@ public:
double to_double(GlobalObject&) const;
i32 to_i32(GlobalObject&) const;
u32 to_u32(GlobalObject&) const;
size_t to_size_t(GlobalObject&) const;
size_t to_length(GlobalObject&) const;
size_t to_index(GlobalObject&) const;
double to_integer_or_infinity(GlobalObject&) const;