Closed Bug 1595594 Opened 5 years ago Closed 5 years ago

Add support for typed arrays to console.table

Categories

(DevTools :: Console, enhancement, P3)

71 Branch
enhancement

Tracking

(firefox72 fixed)

RESOLVED FIXED
Firefox 72
Tracking Status
firefox72 --- fixed

People

(Reporter: chugylo, Assigned: nchevobbe)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:71.0) Gecko/20100101 Firefox/71.0

Steps to reproduce:

Type in the web console:

console.table(new Int8Array([1, 2, 3, 4]))

Actual results:

Output is the same with console.log

Expected results:

Output should be a table for every kind of typed array as Chrome and Node.js do.

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → Console
Product: Firefox → DevTools

I can reproduce, thanks for the report

Assignee: nobody → nchevobbe
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P3

In order to render a table, we first check that console.table is
called with data that can be displayed in a table. Until now, we
were missing all the typed arrays.
This revealed some smaller issues:

  • BigInt64Array were not marked as typed arrays on the server.
  • Generating the repeatId for a message containing BigInts would
    throw because BigInts can't be serialized.

We add test cases for all the typed array, and we take this opportunity
to add a test case to ensure object insides table cells can be expanded.

Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ebafd2a630af Add support for typed arrays to console.table. r=Honza.
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 72
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: