Skip to content

Commit

Permalink
LibJS: Make a __JS_ENUMERATE comment more informative
Browse files Browse the repository at this point in the history
(cherry picked from commit 4ae3a0dcba21080927634f01d52c5cbd3296629f)
  • Loading branch information
shlyakpavel authored and nico committed Nov 27, 2024
1 parent b09eaa1 commit 563e599
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Userland/Libraries/LibJS/Print.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,8 @@ ErrorOr<void> print_typed_array(JS::PrintContext& print_context, JS::TypedArrayB
TRY(print_value(print_context, JS::Value(JS::typed_array_byte_length(typed_array_record)), seen_objects));

TRY(js_out(print_context, "\n"));
// FIXME: This kinda sucks.
// FIXME: Find a better way to print typed arrays to the console.
// The current solution is limited to 100 lines, is hard to read, and hampers debugging.
#define __JS_ENUMERATE(ClassName, snake_name, PrototypeName, ConstructorName, ArrayType) \
if (is<JS::ClassName>(typed_array_base)) { \
TRY(js_out(print_context, "[ ")); \
Expand Down

0 comments on commit 563e599

Please sign in to comment.