Closed Bug 1677657 Opened 4 years ago Closed 4 years ago

Make js::BaseScript::{extent,immutableFlags} const

Categories

(Core :: JavaScript Engine, task, P3)

task

Tracking

()

RESOLVED FIXED
85 Branch
Tracking Status
firefox85 --- fixed

People

(Reporter: tcampbell, Assigned: tcampbell)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

By tweaking how MakeDefaultConstructor works to instead plumb the SourceExtent down to the cloning code, we can make the BaseScript::extent const. Probably can also make the ImmutableFlags const too after the TI removal.

While cloning the default constructor script from self-hosting realm, pass in
the final SourceExtent for the class. This removes the last need for the
BaseScript::extent to be modified so we can now mark it const.

Also clear the script's SelfHosted flag in the same way to avoid modifying it
after the script is created.

Attachment #9188201 - Attachment description: Bug 1677657 - Directly set SourceExtent when cloning default class constructor → Bug 1677657 - Directly set SourceExtent when cloning default class constructor. r?jandem!
Summary: Make js::BaseScript::extent const → Make js::BaseScript::{extent,immutableFlags} const
Pushed by tcampbell@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/293b759748b9 Directly set SourceExtent when cloning default class constructor. r=jandem
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 85 Branch
Regressions: 1678032
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: