Closed Bug 669123 Opened 13 years ago Closed 13 years ago

Add JS API function to group compartments together for allocation purposes

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: n.nethercote, Assigned: n.nethercote)

References

Details

This is a follow-up to bug 666058, which separated chunks into two classes, system and user, to reduce JS heap fragmentation.  The system principal was identified by its name, which is a hack.  Andreas suggested adding API for a cleaner approach:

> We should have some sort of allocation groups. Chunks are assigned an
> allocation groups, only compartments in that allocation group are assigned
> to it. Some clean JSAPI to make those allocation groups.

We can use that API to start with the 'user' and 'system' groups, and maybe add more groups later.  (I wonder if it's worth putting app tabs together in a group, since they're likely to be long-lived, though perhaps not as long-lived as the browser itself.)
Depends on: 666058
I guess this is the more appropriate place to post:
I will soon land bug 667915 which adds rt->trustedPrincipal.
(In reply to comment #1)
>
> I will soon land bug 667915 which adds rt->trustedPrincipal.

Oh, in that case, we'll be able to detect cleanly within the JS engine both the system-principal compartment and the atoms compartment, so there shouldn't be any need for new API.  Thanks, Luke!
Depends on: 667915
> Oh, in that case, we'll be able to detect cleanly within the JS engine both
> the system-principal compartment and the atoms compartment, so there
> shouldn't be any need for new API.  Thanks, Luke!

I spun off bug 671482 for this.  We might want to add the groups API later on.
I'm going to close this.  No progress is planned, and bug 671702 will render it moot if/when it lands (by moving to one compartment per chunk).  We can reopen this if necessary.
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.