Cleanup LazyScript XDR flags

RESOLVED FIXED in Firefox 67

Status

()

enhancement
P2
normal
RESOLVED FIXED
5 months ago
4 months ago

People

(Reporter: tcampbell, Assigned: tcampbell)

Tracking

(Blocks 2 bugs)

unspecified
mozilla67
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox67 fixed)

Details

Attachments

(2 attachments)

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: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67
Blocks: 1535138
You need to log in before you can comment on or make changes to this bug.