Closed Bug 1565781 Opened 5 years ago Closed 5 years ago

console.table() hide the console if sub array contain hole

Categories

(DevTools :: Console, defect)

68 Branch
defect
Not set
normal

Tracking

(firefox69 verified, firefox70 verified)

VERIFIED FIXED
Firefox 70
Tracking Status
firefox69 --- verified
firefox70 --- verified

People

(Reporter: cpartiot, Assigned: nchevobbe)

References

Details

Attachments

(1 file)

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

Steps to reproduce:

  • open the console
  • run:
console.table([[1, , 2]])

Actual results:

the console disappears

Expected results:

result should be normally displayed as table

there is no problem for 1 dimension table:

console.table([1, , 2])

or if table contain undefined

console.table([[1, undefined, 2]])
Component: Untriaged → Console
Product: Firefox → DevTools

A test is added to ensure this is fixed properly.
We also fix the Array previewer to properly return
undefined for unknown array properties, rather than null.

Depends on D38466

Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/67f2361d7b49
Fix ConsoleTable with nested holey array. r=Honza.
Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 70
Assignee: nobody → nchevobbe

Comment on attachment 9079000 [details]
Bug 1565781 - Fix ConsoleTable with nested holey array. r=Honza.

Beta/Release Uplift Approval Request

  • User impact if declined: Impossibility to see a console.table result if the arguments have a specific shape
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: 1. Open the webconsole
  1. Evaluate console.table([[1, , 2]])
  2. Make sure a table was rendered
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): DevTools only change, covered by a mochitest
  • String changes made/needed:
Attachment #9079000 - Flags: approval-mozilla-beta?
Flags: qe-verify+
QA Whiteboard: [qa-triaged]

Verified - fixed on latest Nightly 70.0a1 (2019-07-18) on Ubuntu 18.04, Windows 10 and Mac OS 10.14

Status: RESOLVED → VERIFIED
QA Whiteboard: [qa-triaged]
Flags: qe-verify+
Flags: in-testsuite+

Comment on attachment 9079000 [details]
Bug 1565781 - Fix ConsoleTable with nested holey array. r=Honza.

Fixes a Devtools bug. Approved for 69.0b7.

Attachment #9079000 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Verified - fixed on latest beta version 69.0b7 using Ubuntu 18.04, Windows 10 and Mac OS 10.14

Regressions: 1580727
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: