Closed
Bug 692550
Opened 13 years ago
Closed 13 years ago
console.log("%s", null); should log "null"
Categories
(DevTools :: General, defect)
DevTools
General
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 10
People
(Reporter: ted, Assigned: dchanm+bugzilla)
References
Details
(Whiteboard: [fixed-in-fx-team])
Attachments
(1 file, 1 obsolete file)
1.56 KB,
patch
|
msucan
:
review+
|
Details | Diff | Splinter Review |
Currently console.log("%s", null); raises an error. It should just log "null".
Assignee | ||
Comment 1•13 years ago
|
||
I'm assuming we would also want this to work for undefined? console.log("%s", undefined) -> "undefined"
Assignee: nobody → dchan+bugzilla
Assignee | ||
Comment 2•13 years ago
|
||
This should work. String(undefined) -> "undefined" String(null) -> "null"
Attachment #565332 -
Flags: feedback?
Comment 3•13 years ago
|
||
Comment on attachment 565332 [details] [diff] [review] convert arg to string Looks good. Thank you! Please add a test so we won't cause regressions down the road.
Attachment #565332 -
Flags: feedback? → feedback+
Assignee | ||
Comment 4•13 years ago
|
||
HUDService.jsm doesn't appear to be affected by this bug. I didn't see any reference to the format specifics in the code. Fixing ConsoleAPI.js also fixed the errors that were appearing in WebConsole "args.shift() is null".
Attachment #565332 -
Attachment is obsolete: true
Attachment #565361 -
Flags: review?(mihai.sucan)
Comment 5•13 years ago
|
||
(In reply to David Chan [:dchan] from comment #4) > Created attachment 565361 [details] [diff] [review] [diff] [details] [review] > added testcase > > HUDService.jsm doesn't appear to be affected by this bug. I didn't see any > reference to the format specifics in the code. Fixing ConsoleAPI.js also > fixed the errors that were appearing in WebConsole "args.shift() is null". That's right, parameter substitution is implemented completely in ConsoleAPI.js. This bug is really my fault from bug 614586, so thank you for fixing it!
Comment 6•13 years ago
|
||
Comment on attachment 565361 [details] [diff] [review] [in-fx-team] added testcase Thank you for your quick fix! Much appreciated.
Attachment #565361 -
Flags: review?(mihai.sucan) → review+
Updated•13 years ago
|
Whiteboard: [land-in-fx-team]
Updated•13 years ago
|
Whiteboard: [land-in-fx-team] → [fixed-in-fx-team]
Comment 7•13 years ago
|
||
Comment on attachment 565361 [details] [diff] [review] [in-fx-team] added testcase https://hg.mozilla.org/integration/fx-team/rev/6c66a420067c Thanks for the fix, David!
Attachment #565361 -
Attachment description: added testcase → [in-fx-team] added testcase
Comment 8•13 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/6c66a420067c
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Updated•13 years ago
|
Target Milestone: --- → Firefox 10
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•