Closed Bug 1599386 Opened 5 years ago Closed 5 years ago

Console API call strip first argument if it is an empty string and there are more than 1 argument

Categories

(DevTools :: Console, defect, P3)

defect

Tracking

(firefox72 fixed)

RESOLVED FIXED
Firefox 72
Tracking Status
firefox72 --- fixed

People

(Reporter: nchevobbe, Assigned: baku)

Details

Attachments

(1 file)

console API calls first parameter is trimmed out if it's an empty string.

While working on Bug 1375752, I noticed that doing console.log("", "foo") would only render foo (where it should be <empty string> foo).

Looking at devtools/server/actors/webconsole/listeners/console-api.js#99 I could see that message.arguments only had one item, foo.

Baku, do you have any idea were this might happen, and if we're doing it on purpose?

Flags: needinfo?(amarchesini)
Assignee: nobody → amarchesini
Flags: needinfo?(amarchesini)
Pushed by amarchesini@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9919570a9843
Better string formatting for console events, r=smaug
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 72
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: