Closed Bug 1926075 Opened 9 months ago Closed 9 months ago

Console.log of successive different symbols combines output when it should not

Categories

(DevTools :: Console, defect)

Firefox 131
defect

Tracking

(firefox133 fixed)

RESOLVED FIXED
133 Branch
Tracking Status
firefox133 --- fixed

People

(Reporter: conartist6, Assigned: nchevobbe)

Details

Attachments

(1 file)

Steps to reproduce:

console.log(Symbol.for('foo'))
console.log(Symbol.for('bar'))

Actual results:

The console output is:

Symbol("foo") (2)

Note that the browser has decided to consolidate these values as identical despite the fact that they are not.

Also I cannot reproduce the issue when simply pasting the two console.logs into the REPL, they actually have to be running in a script file. JSFiddle suffices: https://jsfiddle.net/Ldmqsvc8/

Expected results:

Symbol("foo")
Symbol("bar")

Symbol.for('foo') vs Symbol('foo') appears to be irrelevant in reproducing the issue.

The Bugbug bot thinks this bug should belong to the 'DevTools::Console' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Console
Product: Firefox → DevTools
Assignee: nobody → nchevobbe
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true

Thanks for the report. I was able to reproduce it easily.

Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/298caae11e52 [devtools] Don't repeat Symbols with different names in console. r=devtools-reviewers,bomsy.
Status: ASSIGNED → RESOLVED
Closed: 9 months ago
Resolution: --- → FIXED
Target Milestone: --- → 133 Branch

Thank you very much for your prompt triage and fix!

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

Attachment

General

Created:
Updated:
Size: