1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 03:17:35 +00:00

js: Replace TypedArray class_name() string compare with is<T>()

This commit is contained in:
Linus Groh 2021-03-18 18:34:18 +01:00 committed by Andreas Kling
parent 3507397fed
commit 1ef0078b4c

View file

@ -310,7 +310,7 @@ static void print_typed_array(const JS::Object& object, HashTable<JS::Object*>&
outln();
// FIXME: This kinda sucks.
#define __JS_ENUMERATE(ClassName, snake_name, PrototypeName, ConstructorName, ArrayType) \
if (StringView(object.class_name()) == StringView(#ClassName)) { \
if (is<JS::ClassName>(object)) { \
out("[ "); \
auto& typed_array = static_cast<const JS::ClassName&>(typed_array_base); \
auto data = typed_array.data(); \