Simplify finding debugger sweep group edges

RESOLVED FIXED in Firefox 68

Status

()

task
P3
normal
RESOLVED FIXED
3 months ago
3 months ago

People

(Reporter: jonco, Assigned: jonco)

Tracking

Trunk
mozilla68
Points:
---

Firefox Tracking Flags

(firefox68 fixed)

Details

Attachments

(1 attachment)

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