From a4f9630470f25adfe7afb874902fbc891e023f4f Mon Sep 17 00:00:00 2001 From: ForLoveOfCats Date: Wed, 2 Mar 2022 02:12:00 -0500 Subject: [PATCH] js: Print `ArrayBuffer.maxByteLength` when present --- Userland/Utilities/js.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Userland/Utilities/js.cpp b/Userland/Utilities/js.cpp index 8224f17463..8eb75c6f97 100644 --- a/Userland/Utilities/js.cpp +++ b/Userland/Utilities/js.cpp @@ -423,6 +423,10 @@ static void print_array_buffer(JS::Object const& object, HashTable& print_type("ArrayBuffer"); js_out("\n byteLength: "); print_value(JS::Value((double)byte_length), seen_objects); + if (array_buffer.is_resizable_array_buffer()) { + js_out("\n maxByteLength: "); + print_value(JS::Value((double)array_buffer.max_byte_length()), seen_objects); + } if (!byte_length) return; js_outln();