console.log() does not emit BigInt in format specifier
Categories
(DevTools :: Console, defect, P3)
Tracking
(firefox113 fixed)
Tracking | Status | |
---|---|---|
firefox113 | --- | fixed |
People
(Reporter: david, Assigned: shisama07)
Details
Attachments
(1 file)
User Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:96.0) Gecko/20100101 Firefox/96.0
Steps to reproduce:
In console, execute: console.log('foo: %d', BigInt(5))
Actual results:
No message is emitted to console at all
Expected results:
Message "foo: 5n" should be emitted to console.
Not a world-ending priority but this thing completely swallowed diagnostic messages for a module I was working on. In a console-noisy environment, this might not be noticed.
Comment 2•3 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'DevTools::Console' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.
Comment 3•3 years ago
|
||
Nicolas will investigate where we lose this message.
Comment 4•3 years ago
|
||
Thanks for filing David, I'll try to see where we block this message.
Small note; according to the spec:
If specifier is %d or %i:
If Type(current) is Symbol, let converted be NaN
Otherwise, let converted be the result of Call(%parseInt%, undefined, « current, 10 »).
So the result should be: foo: 5
(since parseInt(5n)
-> 5
)
Comment 5•3 years ago
|
||
Seems like we're hitting this: https://searchfox.org/mozilla-release/rev/30f8a5a2dd07280e4445f566980522fe876bec70/dom/console/Console.cpp#2003-2005
Baku, would it be easy to ensure we support BigInt ?
Comment 6•3 years ago
|
||
The fix is simple, I guess. But I don't have the bandwidth to work on it. Nicolas, can you take this?
Comment 7•3 years ago
|
||
alright, let's see if I can do it. I'll ask you to review the patch :)
Assignee | ||
Comment 8•2 years ago
|
||
Updated•2 years ago
|
Updated•2 years ago
|
Updated•2 years ago
|
Comment 10•2 years ago
|
||
bugherder |
Description
•