Closed Bug 1548242 Opened 5 years ago Closed 5 years ago

Simplify finding debugger sweep group edges

Categories

(Core :: JavaScript: GC, task, P3)

task

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: jonco, Assigned: jonco)

References

Details

Attachments

(1 file)

As mentioned in bug 1547042 comment 2.

Debugger::findSweepGroupEdges adds edges that are the reverse of those added in Compartment::findSweepGroupEdges. It uses an extra hash table associated with each debugger weak map to cache which zones each map has keys in.

However we already iterate the entire wrapper map in Compartment::findSweepGroupEdges, so we can add the edges there and dispense with this cache. This also makes it clearer what's happening.

If we optimise this later (e.g. bug 1518107) we can add a cache as part of the CCW map, where it can apply to all debugger wrappers.

Rather than consulting the debugger weak maps to add reverse edges corresponding to forward edges added for cross compartment wrappers, add both forward and reverse edges when iterating the cross compartment wrapper map. Remove zone counts from debugger weak maps.

Pushed by jcoppeard@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7637b7b1a6d2
Use cross compartment wrapper map to calculate debugger's sweep group edges where possible r=sfink?
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
Duplicate of this bug: 1182157
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: