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

NEW
Unassigned

Status

()

Core
Identity
--
minor
5 years ago
5 years 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.
You need to log in before you can comment on or make changes to this bug.