Closed Bug 755158 Opened 8 years ago Closed 4 years ago

Update JSCompartment::debuggees for CPG

Categories

(Core :: JavaScript Engine, defect)

defect
Not set

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: njn, Unassigned)

References

Details

(Whiteboard: [js:t][MemShrink:P3])

JSCompartments::debuggees has this declaration:

    /*
     * Weak reference to each global in this compartment that is a debuggee.
     * Each global has its own list of debuggers.
     */
    js::GlobalObjectSet              debuggees;

Sounds like that's a candidate for a post-CPG clean-up.  I can see two approaches:

1. Move it into the JSRuntime.

2. Change it to a single pointer (GlobalObject *) or even a single bit (which just indicates if the compartment's global is a debuggee).

Option 2 sounds like it might simplify the code more, but I'm not certain.
Assignee: n.nethercote → general
BTW, |debuggees| takes up 512 bytes per compartment, even though it's empty in the common case(?)  We now have ~100 compartments on start-up, so that's 50KB.
Whiteboard: [MemShrink]
Whiteboard: [MemShrink] → [MemShrink:P3]
Whiteboard: [MemShrink:P3] → [js:t][MemShrink:P3]
Assignee: general → nobody
|debuggees| is now part of the Debugger class, so I don't think this is relevant any more.
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.