Firefox user.js mysteriously not being parsed?

Firefox user.js mysteriously not being parsed?

The problem I ran into: apparently the user.js file is not being read as a JS script. The file-name extension .js is a misnomer, it does not permit all JS syntax.

Look at the contents of this user.js:

user_pref("_user.js.parrot", "Possible error parsing user.js");

user_pref("services.sync.engine.bookmarks", false)
user_pref("services.sync.engine.addons", false)
user_pref("services.sync.engine.history", false)
user_pref("services.sync.engine.prefs", false)
user_pref("services.sync.engine.prefs.modified", false)
user_pref("services.sync.engine.tabs", false)

user_pref("browser.startup.page", 3);

user_pref("_user.js.parrot", "No problems detected");

Observe that some of these lines are missing a semicolon on the end.

If that was considered a syntax error, you'd expect the parsing to never arrive to the last line.

Yet… it does. What's even more strange is that it seems to skip over the lines in between: you'll read "No problems detected" even though the setting "browser.startup.page" does NOT get set to 3.

That's some odd behavior.

Add semicolons, then everything works.

Created (4 days ago)