Closed Bug 1208162 Opened 9 years ago Closed 9 years ago

In --without-intl-api builds, JS errors are logged at startup & later: "JavaScript error: resource://gre/modules/LoginManagerContextMenu.jsm, line 20: ReferenceError: Intl is not defined"

Categories

(Toolkit :: Password Manager, defect)

defect
Not set
normal

Tracking

()

RESOLVED WONTFIX
Tracking Status
firefox44 --- affected

People

(Reporter: dholbert, Unassigned)

References

Details

(Keywords: regression)

STR:
 1. Start a debug build with a fresh profile, from a terminal.
 2. Watch your terminal output.

ACTUAL RESULTS: Pretty early on (within the first 20 lines) I see this:
{
JavaScript error: resource://gre/modules/LoginManagerContextMenu.jsm, line 20: ReferenceError: Intl is not defined
}

This points to this line:
http://hg.mozilla.org/mozilla-central/annotate/001942e4617b/toolkit/components/passwordmgr/LoginManagerContextMenu.jsm#l20
...which was added recently in bug 433238.
MattN or rittme, could one of you take a look at this? Startup JS errors are kinda messy & annoying.

(I'm not sure why Intl is not defined in this case -- Intl.DateTimeFormat definitely seems to exist if I open the web console. Maybe some module hasn't been loaded yet?)
Flags: needinfo?(MattN+bmo)
(In reply to Daniel Holbert [:dholbert] from comment #1)
> (I'm not sure why Intl is not defined in this case -- Intl.DateTimeFormat
> definitely seems to exist if I open the web console. Maybe some module
> hasn't been loaded yet?)

Sorry, this was wrong -- I was testing a *different build*'s web console. If I test the same build where I'm hitting this, then I do see "Intl" doesn't exist in my web console, either.

I suspect this has to do with "--without-intl-api" in my mozconfig -- that probably explains why Intl is undefined.

Is this "no Intl" configuration something that we can easily support with fallback code here? It's a convenient mozconfig flag, because it shortens my build-times / buildspew.  But it's unfortunate that it now causing runtime terminal-logging due to the unchecked usage here in LoginManager code.
Summary: JS error logged at startup: "JavaScript error: resource://gre/modules/LoginManagerContextMenu.jsm, line 20: ReferenceError: Intl is not defined" → In --without-intl-api builds, JS errors are logged at startup & later: "JavaScript error: resource://gre/modules/LoginManagerContextMenu.jsm, line 20: ReferenceError: Intl is not defined"
I'd take a patch to make that property lazy with XPCOMUtils.defineLazyGetter but since this isn't a supported configuration this is a low priority to personally fix.
Flags: needinfo?(MattN+bmo)
Re-open if you want provide a patch.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.