Logger.log.apply(Logger, ["foo"].concat(aMessageArgs)); pattern concats an array when debugging is disabled

RESOLVED INCOMPLETE

Status

()

--
minor
RESOLVED INCOMPLETE
6 years ago
a month ago

People

(Reporter: MattN, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Quoting Justin Dolske [:Dolske] from bug 764213 comment #12)
> ::: browser/modules/SignInToWebsite.jsm
> @@ +19,5 @@
> > +XPCOMUtils.defineLazyModuleGetter(this, "Logger",
> > +                                  "resource://gre/modules/identity/LogUtils.jsm");
> > +
> > +function log(...aMessageArgs) {
> > +  Logger.log.apply(Logger, ["SignInToWebsiteUX"].concat(aMessageArgs));
> 
> Wish we didn't do this, because it's generating garbage even when debugging
> is disabled. :(
I agree.  I'd like to see this cleaned up, too.
See https://bugzilla.mozilla.org/show_bug.cgi?id=1497358; closing remaining open bugs in this component.
Status: NEW → RESOLVED
Last Resolved: a month ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.