Closed Bug 1572280 Opened 4 months ago Closed 4 months ago

Reparse sources with GC'ed scripts when getting breakpoint positions

Categories

(DevTools :: Debugger, enhancement, P2)

enhancement

Tracking

(firefox70 fixed)

RESOLVED FIXED
Firefox 70
Tracking Status
firefox70 --- fixed

People

(Reporter: bhackett, Assigned: bhackett)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [debugger-reserve])

Attachments

(3 files)

Breakpoint positions for a source should reflect all places where breakpoints can be set in the source, but if scripts have been GC'ed then the positions returned by the server will be incomplete, preventing users from being able to set breakpoints within them, a pretty confusing behavior. We have the text for the source, so it can just be reparsed to figure out where the breakpoint positions are. For efficiency, it seems best to do this only when we know that scripts in the source might have been GC'ed. I'm reasonably sure that sources can contain at most one non-function script, which will the top level script and will hold all other scripts in the source alive. So, if we are able to find this script, we know that there aren't any missing breakpoint positions and can avoid reparsing.

Blocks: dbg-70
Status: NEW → ASSIGNED
Whiteboard: [debugger-reserve]
Priority: -- → P2
Pushed by bhackett@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/bc14494262b1
Part 1 - Add Debugger.Source.reparse(), r=jimb.
https://hg.mozilla.org/integration/autoland/rev/1c11235a668a
Part 2 - Add Debugger.Script.isFunction, r=jimb.
https://hg.mozilla.org/integration/autoland/rev/efe4a620841c
Part 3 - Reparse sources with GC'ed scripts to get all breakpoint positions, r=loganfsmyth.
Status: ASSIGNED → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 70
Regressions: 1579654
You need to log in before you can comment on or make changes to this bug.