unterminated string literal dialog on startup if malformed entry in prefs.js, lauch should about not continue

RESOLVED DUPLICATE of bug 107264

Status

()

Core
Preferences: Backend
--
minor
RESOLVED DUPLICATE of bug 107264
15 years ago
14 years ago

People

(Reporter: Derwood, Assigned: Conrad Carlen (not reading bugmail))

Tracking

Trunk
x86
Windows XP
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

15 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4a) Gecko/20030401
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4a) Gecko/20030401

When I added:

user_pref("general.smoothScroll, true);

I forgot the closing double quotes and got a dialog on startup warning of the
unterminated string literal.  Instead of aborting to launch, it continued.  It
created a new cahce directory et al as if it was a new profile.  It should have
just stopped.

Fixing the line fixed the problem, but the behavior on this type of error should
change.

Reproducible: Always

Steps to Reproduce:
Prefs back end.  Please read component descriptions -- "Preferences" refers to
the implementation of the preferences dialog.
Assignee: ben → ccarlen
Component: Preferences → Preferences: Backend

Comment 2

14 years ago
I can confirm this. It appears that we truncate anything in the prefs file from
the bad pref down to the end of the prefs list. If the maformed pref is at the
tail end of the preference, just it is lost. If it's high on the list, we throw
out a lot. 

One more reason to not hand-edit your preferences file. Use about:config or user.js

Tested with 1.7 beta on winXP.

*** This bug has been marked as a duplicate of 107264 ***
Status: UNCONFIRMED → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.