Closed
Bug 1239506
Opened 8 years ago
Closed 8 years ago
console formatter should format 'nan' as 'NaN'
Categories
(DevTools :: Console, defect)
Tracking
(firefox47 verified)
RESOLVED
FIXED
Firefox 47
Tracking | Status | |
---|---|---|
firefox47 | --- | verified |
People
(Reporter: coreyf, Assigned: bgrins)
Details
(Whiteboard: [console-spec])
Attachments
(1 file, 1 obsolete file)
2.80 KB,
patch
|
baku
:
review+
|
Details | Diff | Splinter Review |
For some reason, Firefox formats "not a number" value as 'nan' sometimes in the console. For the sake of consistency, this should probably be styled as 'NaN'. https://github.com/whatwg/console/blob/master/NOTES.md#float-formatter Firefox: ``` console.log("%f", "fo") nan ``` Chrome: ``` console.log("%f", "fo") NaN ```
Assignee | ||
Updated•8 years ago
|
Whiteboard: [console-spec]
Assignee | ||
Comment 1•8 years ago
|
||
Andrea, this fixes the problem but I'm not sure if it's the best option. Switching to AppendFloat instead of AppendFormatString also fixes it but then I don't think we can keep the `mantissa` functionality. FWIW the mantissa syntax isn't supported by Chrome or in the lastest spec: https://console.spec.whatwg.org/#formatting-no-ui
Attachment #8712345 -
Flags: feedback?(amarchesini)
Updated•8 years ago
|
Attachment #8712345 -
Flags: feedback?(amarchesini) → feedback+
Assignee | ||
Comment 2•8 years ago
|
||
Comment on attachment 8712345 [details] [diff] [review] console-nan.patch Review of attachment 8712345 [details] [diff] [review]: ----------------------------------------------------------------- Alright, flagging for review. Here's a try push: https://treeherder.mozilla.org/#/jobs?repo=try&revision=38c25d87584d
Attachment #8712345 -
Flags: review?(amarchesini)
Assignee | ||
Comment 3•8 years ago
|
||
Actually, switched to AppendFloat for nan case to get rid of hardcoded string. I'm assuming this behavior is defined across platforms, I guess try will show
Attachment #8712345 -
Attachment is obsolete: true
Attachment #8712345 -
Flags: review?(amarchesini)
Attachment #8712712 -
Flags: review?(amarchesini)
Updated•8 years ago
|
Attachment #8712712 -
Flags: review?(amarchesini) → review+
Comment 5•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/24320d1e9d99
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox47:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 47
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → bgrinstead
Comment 6•8 years ago
|
||
I have reproduced this bug on Nightly 46.0a1 (2016-01-13) on ubuntu 14.04 LTS, 32 bit! The bug's fix is now verified on Latest Developer Edition 47.0a2! Build ID: 20160323004040 User Agent: Mozilla/5.0 (X11; Linux i686; rv:47.0) Gecko/20100101 Firefox/47.0
QA Whiteboard: [bugday-20160323]
Comment 7•8 years ago
|
||
I have reproduced this bug with Firefox nightly 46.0a1(build id:20160113030208)on windows 7(64 bit) I have verified this bug as fixed with Firefox aurora 47.0a2(build id:20160323004040) User Agent: Mozilla/5.0 (X11; Linux i686; rv:47.0) Gecko/20100101 Firefox/47.0
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•