Closed Bug 1555464 Opened 4 years ago Closed 4 years ago

Turn the pref for public fields on by default


(Core :: JavaScript Engine, task, P1)




Tracking Status
firefox69 --- fixed


(Reporter: khyperia, Assigned: jorendorff)



(Keywords: dev-doc-complete)


(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.

Flags: needinfo?(jorendorff)


  • 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
Part 1: Turn the pref for public fields on by default. r=khyperia
Part 2: Enable fields by default in the JS shell. r=khyperia
Pushed by
Part 2: Enable fields by default in the JS shell. r=khyperia
Closed: 4 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.