Closed Bug 1530513 Opened 1 year ago Closed 1 year ago

Cleanup LazyScript XDR flags

Categories

(Core :: JavaScript Engine, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
mozilla67
Tracking Status
firefox67 --- fixed

People

(Reporter: tcampbell, Assigned: tcampbell)

References

Details

Attachments

(2 files)

The LazyScript flag handling is a inconsistent with JSScript when it comes to XDR. Bug 1503496 made it a lot clearer for JSScripts which flags are preserved by XDR and which are not, but the same reasoning should be applied to LazyScripts. Eventually, a LazyScript should use the same flags as a JSScript.

This brings LazyScript behaviour of this flag in sync with JSScript and
the split between ImmutableFlags and MutableFlags.

  • Ensure that HasBeenCloned flag is set on LazyScript when setting it on
    JSScript so it is preserved by relazification.
  • Never preserve HasBeenCloned flag in LazyScript XDR.
    NOTE: With the first fix, this is not needed for tests to pass anymore.
  • Add a LazyScript::packedFieldsForXDR() helper to strip out runtime
    flags before serializing.

Depends on D21069

Pushed by tcampbell@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/1d4617ef65c8
Preserve LazyScript::treatAsRunOnce during XDR r=jandem
https://hg.mozilla.org/integration/autoland/rev/31e8a0659913
Fix handling of LazyScript HasBeenCloned flag r=jandem
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67
Blocks: 1535138
You need to log in before you can comment on or make changes to this bug.