Closed Bug 1555464 Opened 5 years ago Closed 5 years ago

Turn the pref for public fields on by default

Categories

(Core :: JavaScript Engine, task, P1)

task

Tracking

()

RESOLVED FIXED
mozilla69
Tracking Status
firefox69 --- fixed

People

(Reporter: khyperia, Assigned: jorendorff)

References

Details

(Keywords: dev-doc-complete)

Attachments

(2 files)

There's not really any actual work to do here: this is a tracking bug for the release of public fields.

See the depends-on list of bug 1499448 to assess what remaining work there is. The tree view is particularly helpful.

Assignee: nobody → jorendorff
Keywords: dev-doc-needed

Public fields are a JavaScript language feature that's used in classes.

class Car {
  make = "Ford";
  model = "Prefect";
  wheels = [0, 0, 0, 0];
}

let myCar = new Car;  // {make: "Ford", model: "Prefect", wheels: [0, 0, 0, 0]}

We implement only the public fields described in this proposed specification. No private fields yet.

Depends on: 1559269

Do you know if there should be some devtools support for this?
I can't think of anything specific, but maybe I'm missing something.
Thanks

Flags: needinfo?(jorendorff)

Try

  • stepping over the class Car declaration;
  • stepping into new Car and stepping over each assignment

and see if the behavior is reasonable.

Unfortunately, I think it will probably be ugly and hard to fix. :-\

Flags: needinfo?(jorendorff)
Pushed by jorendorff@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d7e33c843b24 Part 1: Turn the pref for public fields on by default. r=khyperia https://hg.mozilla.org/integration/autoland/rev/8227f5fbbe20 Part 2: Enable fields by default in the JS shell. r=khyperia
Pushed by jorendorff@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9e789088540d Part 2: Enable fields by default in the JS shell. r=khyperia
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla69

Jason/Ashley, is --disable-experimental-fields worth testing? (if so, it should probably be in fuzz-flags.txt)

Sidenote, --enable-experimental-fields got removed here...

Flags: needinfo?(khyperia)
Flags: needinfo?(jorendorff)

In my opinion, probably not? I'm not 100% sure of why we keep the flag in, I'm assuming it's a last resort backup plan to disable things if everything explodes? So it's not going to stay relevant for long, once the feature has rode all the way to release.

Flags: needinfo?(khyperia)

Agreed, it's only there as a last resort backup plan.

I would not bother fuzz-testing this.

Flags: needinfo?(jorendorff)

Gary, note that I'm going to do the same thing to --enable-experimental-await-fix later this week, over in bug 1558971.

Got it, thanks! (I won't bother with these flags then, just clarifying...)

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

Attachment

General

Created:
Updated:
Size: