Closed Bug 222023 Opened 21 years ago Closed 21 years ago

regression: pref parser should accept single-quote delimited strings [was: Extension default preferences in [application folder]/defaults/pref are not parsed]

Categories

(Core :: Preferences: Backend, defect)

x86
Windows XP
defect
Not set
major

Tracking

()

RESOLVED FIXED
mozilla1.6alpha

People

(Reporter: velcrospud, Assigned: darin.moz)

Details

(Keywords: regression)

Attachments

(2 files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4b) Gecko/20030523 Mozilla Firebird/0.6
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6a) Gecko/20031013

Extensions used to be able to add default preferences but after the patch for
bug 98533 - the entries in the extension's preference file in [application
folder]/defaults/pref is no longer added to the list of preferences in about:config.

Tested in trunk builds of mozilla and firebird, before and after the patch for
bug 98533 (2003.09.16)

Reproducible: Always

Steps to Reproduce:
1.Place testpref.js in [application folder]/defaults/pref
2.open mozilla, go to "about:config"


Actual Results:  
The preference in testpref.js did not show up in about:config

Expected Results:  
The preference would be there.
Testcase for an extension's default preferences.
Put in [Application folder]/defaults/pref
Start Mozilla.	Goto "about:config"
You should see an entry for "aaatestpreference.for.extension" (probably first
on the list)
try using double quotes instead of single quotes.  e.g.,

  pref("aaatestpreference.for.extension", true);

should work.  if i'm right, then the bug is that we don't honor single quotes in
the pref names.
-> me
Assignee: ccarlen → darin
That's it. Thanks.
Double quotes it is.
Severity: normal → major
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Keywords: regression
Summary: Extension default preferences in [application folder]/defaults/pref are not parsed → regression: pref parser should accept single-quote delimited strings [was: Extension default preferences in [application folder]/defaults/pref are not parsed]
Target Milestone: --- → mozilla1.6alpha
Attached patch v1 patchSplinter Review
this patch takes care of three things:

1- adds support for single quote delimiters for string names and values.

2- moves quoted string parsing into a single state, shared by name and value
parsing.

3- fixes an ABR error that could occur if we encountered an unhandled escape
sequence.
Attachment #133385 - Flags: review?(timeless)
Attachment #133385 - Flags: review?(timeless) → review+
Attachment #133385 - Flags: superreview?(brendan)
Comment on attachment 133385 [details] [diff] [review]
v1 patch

sr=brendan@mozilla.org

/be
Attachment #133385 - Flags: superreview?(brendan) → superreview+
fixed-on-trunk
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: