Closed Bug 1338971 Opened 7 years ago Closed 7 years ago

Stop using nonstandard JavaScript in AutoConfig files

Categories

(Core :: AutoConfig (Mission Control Desktop), defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla54
Tracking Status
firefox54 --- fixed

People

(Reporter: emk, Assigned: emk)

References

Details

Attachments

(1 file)

Because we have enabled let on all JS versions (bug 855665), there is no reason to enable nonstandard syntax.

We are going to retire JavaScript versions (bug 867609), so there is nothing wrong with JSVERSION_DEFAULT. Rather, the current constant name JSVERSION_LATEST is misleading. Although it may have been appropriate as of ES4 era, it should be named something like JSVERSION_NONSTANDARD nowadays.
I'm not sure what you mean by this. JSVERSION_LATEST is used throughout Firefox.

Shouldn't there just be a generic bug to replace JSVERSION_LATEST with JSVERSION_DEFAULT?

There was no intention to use AutoConfig with non standard Javascript, just the same version that is the deafult in Firefox.
(In reply to Mike Kaply [:mkaply] from comment #1)
> I'm not sure what you mean by this. JSVERSION_LATEST is used throughout
> Firefox.

Because we still have dependency on non-standard JavaScript in our Firefox codebase and add-ons.

> Shouldn't there just be a generic bug to replace JSVERSION_LATEST with
> JSVERSION_DEFAULT?

We have (bug 867609), but we have to remove dependency on non-standard JavaScript first. Bug 1152512 is a relatively recent fix, so I expect not many AutoConfig scripts depend on non-standard JavaScript yet.

> There was no intention to use AutoConfig with non standard Javascript, just
> the same version that is the deafult in Firefox.

We are going to change the default, so we should not add no new context depending on non-standard JavaScript.
Sorry, I'm just not understanding. What do you mean by non standard Javascript?

Are you saying JSVERSION_LATEST is allowing for behaviors that JSVERSION_DEFAULT does not?
(In reply to Mike Kaply [:mkaply] from comment #3)
> Sorry, I'm just not understanding. What do you mean by non standard
> Javascript?
> 
> Are you saying JSVERSION_LATEST is allowing for behaviors that
> JSVERSION_DEFAULT does not?

Yes. JSVERSION_LATEST enables for-each syntax (bug 1083470) and legacy generators (bug 1083482). Both are non-standard (they had been a draft standard until ES4 is dropped, but they are non-standard these days).
This is basically backout of bug 1152512.
Assignee: mozilla → VYV03354
Status: NEW → ASSIGNED
Comment on attachment 8836702 [details]
Bug 1338971 - Stop using non-standard JavaScript in AutoConfig files.

This looks OK to me, but we need to make sure we relnote this because last time we changed things in AutoConfig, we broke folks.
Attachment #8836702 - Flags: review?(mozilla) → review+
(In reply to Mike Kaply [:mkaply] from comment #7)
> This looks OK to me, but we need to make sure we relnote this because last
> time we changed things in AutoConfig, we broke folks.

OK. Do you have suggested wording and blog post for a relnote request?
Flags: needinfo?(mozilla)
Pushed by VYV03354@nifty.ne.jp:
https://hg.mozilla.org/integration/mozilla-inbound/rev/5d3d0bd5aff5
Stop using non-standard JavaScript in AutoConfig files. r=mkaply
https://hg.mozilla.org/mozilla-central/rev/5d3d0bd5aff5
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
> OK. Do you have suggested wording and blog post for a relnote request?

Actually thinking about this more, I say don't worry about it. It's non standard JS and we should be good.

let was more of a problem than for each (and why I did the original patch).
Flags: needinfo?(mozilla)
You need to log in before you can comment on or make changes to this bug.