Closed Bug 1591596 Opened 5 years ago Closed 4 years ago

Remove JSScript::AutoDelazify

Categories

(Core :: JavaScript Engine, task, P2)

task

Tracking

()

RESOLVED INVALID

People

(Reporter: tcampbell, Unassigned)

References

Details

The JSScript::AutoDelazify is used when cloning function scripts to keep the script non-lazy. In practice a RootedScript(cx, JSFunction::getOrCreateScript(...)) should be enough to ensure we have the script we are cloning. Even if the source function is relazified, the we just need the source script for the clone.

The one wrinkle is that js::CloneScriptIntoFunction will blindly copy the script flags. We'll want to normalize them so that we don't get tripped up by a lazy script. Whatever work around we use here can be removed once JSFunction no longer tracks the is-lazy bit.

Turns out we cannot remove this because it is guarding scripts in non-active realm from being relazified. Instead the documentation around all this should be improved.

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.