mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-11 01:22:43 +02:00
Previously, we would crash if `console.table()` was called with a proxy-wrapped array. This is because `Value::is_array()` returns true for proxy-wrapped arrays but `as_array()` simply casts to an Array object. We now treat these objects as array-like and access elements generically through the Object interface, which correctly dispatches through Proxy traps.
7 lines
189 B
HTML
7 lines
189 B
HTML
<!DOCTYPE html>
|
|
<script>
|
|
console.table({ a: new Proxy([1, 2, 3], {}) });
|
|
console.table(new Proxy([1, 2, 3], {}));
|
|
console.table({ a: 1, b: 2 }, new Proxy(["a"], {}));
|
|
</script>
|