LibJS: Rename Value::as_array() to Value::as_array_exotic_object()`

This better describes what the method returns and avoids the possible
confusion caused by the mismatch in behavior between
`Value::is_array()` and `Value::as_array()`.
This commit is contained in:
Tim Ledbetter
2026-03-29 09:11:33 +01:00
committed by Andreas Kling
parent 17ea7b5f86
commit 275e141823
Notes: github-actions[bot] 2026-03-29 11:46:36 +00:00
4 changed files with 6 additions and 6 deletions

View File

@@ -416,7 +416,7 @@ inline JSFileResult TestRunner::run_file_test(ByteString const& test_path)
// Collect logged messages
auto user_output = MUST(realm->global_object().get("__UserOutput__"_utf16_fly_string));
auto& arr = user_output.as_array();
auto& arr = user_output.as_array_exotic_object();
for (u32 i = 0; i < arr.indexed_array_like_size(); ++i) {
auto message = MUST(arr.get(i));
file_result.logged_messages.append(message.to_string_without_side_effects().to_byte_string());