Closed Bug 1623766 Opened 5 years ago Closed 4 years ago

Remove js::IterateLazyScripts

Categories

(Core :: JavaScript Engine, task, P3)

task

Tracking

()

RESOLVED FIXED
83 Branch
Tracking Status
firefox83 --- fixed

People

(Reporter: tcampbell, Assigned: tcampbell)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file)

Once Bug 1623761 removes the need for special handling betwen lazy and non-lazy BaseScript instances, we should remove the IterateLazyScripts API entirely. Instead, IterateScripts should fire its callback for all BaseScripts. Most uses of IterateScripts will do the right thing, but each one will need to be checked.

Note that the code in [1] is for old systems that have since been removed and can be ignored. The two consider functions can be merged to just respond to any BaseScript.

[1] https://searchfox.org/mozilla-central/rev/6cd54550a27e2f6ca0755a25328f769e41e524f4/js/src/debugger/Debugger.cpp#5458-5459,5474-5476

u7693: Here's another bug for you to look at. A bit more complicated, but something you can start looking over.

A good starting point would be to simply all of [1] to a single case. In Comment 1 I have a few tips for what you can ignore.

Without solving Bug 1623761, you might be able to still make progress at removing IterateLazyScripts by putting a hasBytecode test in [2].

Another tip is that for [3], you can allow any lazy/non-lazy BaseScript through because the function is only called when the lazy syntax-only parser is fully disabled.

[1] https://searchfox.org/mozilla-central/rev/6cd54550a27e2f6ca0755a25328f769e41e524f4/js/src/debugger/Debugger.cpp#5433-5483
[2] https://searchfox.org/mozilla-central/rev/6cd54550a27e2f6ca0755a25328f769e41e524f4/js/src/debugger/Debugger.cpp#5169-5179
[3] https://searchfox.org/mozilla-central/rev/6cd54550a27e2f6ca0755a25328f769e41e524f4/js/src/vm/BytecodeUtil.cpp#2918

I would like to work on this bug.

Assignee: nobody → u7693
Assignee: u7693 → tcampbell

Remove the IterateLazyScripts API and have IterateScripts fire for all
BaseScript whether they have bytecode or not. Update the uses in the debugger
to support this change in behaviour.

Depends on D93039

Pushed by tcampbell@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9fbaeb54821f Remove js::IterateLazyScripts. r=arai,jonco
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 83 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: