Last Comment Bug 735877 - Update syntax hints in pref files to reflect the fact that you can't use computed values (e.g. 2 * 4)
: Update syntax hints in pref files to reflect the fact that you can't use comp...
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Preferences: Backend (show other bugs)
: unspecified
: All All
: -- normal (vote)
: mozilla14
Assigned To: Justin Lebar (not reading bugmail)
:
: Benjamin Smedberg [:bsmedberg]
Mentors:
Depends on:
Blocks: 787873
  Show dependency treegraph
 
Reported: 2012-03-14 15:11 PDT by Justin Lebar (not reading bugmail)
Modified: 2012-09-05 03:19 PDT (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch v1 (2.14 KB, patch)
2012-03-14 15:18 PDT, Justin Lebar (not reading bugmail)
dtownsend: review+
Details | Diff | Splinter Review

Description Justin Lebar (not reading bugmail) 2012-03-14 15:11:07 PDT
See bug 732820 comment 24 -- using computed values (e.g. 50 * 1024) in pref files causes major bustage.

We should update the "syntax hints" section at the top of the pref files to reflect this.
Comment 1 Justin Lebar (not reading bugmail) 2012-03-14 15:18:15 PDT
Created attachment 605988 [details] [diff] [review]
Patch v1
Comment 2 Nicholas Nethercote [:njn] 2012-03-14 15:27:05 PDT
I'd like to know *why* computed values don't work.  Is this not a vanilla JS file?
Comment 3 Dave Townsend [:mossop] 2012-03-14 15:29:10 PDT
(In reply to Nicholas Nethercote [:njn] from comment #2)
> I'd like to know *why* computed values don't work.  Is this not a vanilla JS
> file?

The file is not executed as JS, it's just simply parsed as text
Comment 4 Nicholas Nethercote [:njn] 2012-03-14 15:32:01 PDT
> The file is not executed as JS, it's just simply parsed as text

Ah.  Maybe changing the suffix to .txt would help avoid confusion?
Comment 5 Dave Townsend [:mossop] 2012-03-14 15:35:11 PDT
(In reply to Nicholas Nethercote [:njn] from comment #4)
> > The file is not executed as JS, it's just simply parsed as text
> 
> Ah.  Maybe changing the suffix to .txt would help avoid confusion?

At the expense of an awful lot of bustage. Given the few cases that I've heard of this causing problems I don't think it is worth it.
Comment 6 Justin Lebar (not reading bugmail) 2012-03-14 15:51:05 PDT
https://hg.mozilla.org/integration/mozilla-inbound/rev/0eb8564567df
Comment 7 Marco Bonardo [::mak] 2012-03-15 08:22:42 PDT
https://hg.mozilla.org/mozilla-central/rev/0eb8564567df
Comment 8 neil@parkwaycc.co.uk 2012-09-05 03:19:30 PDT
(In reply to Nicholas Nethercote from comment #2)
> Is this not a vanilla JS file?

It used to be before bug 98533 back in 2003...

Note You need to log in before you can comment on or make changes to this bug.