Closed
Bug 1357862
(same-compartment-realms)
Opened 8 years ago
Closed 6 years ago
[meta] Support multiple globals per compartment (same-compartment realms)
Categories
(Core :: JavaScript Engine, enhancement, P2)
Core
JavaScript Engine
Tracking
()
People
(Reporter: jorendorff, Assigned: jandem)
References
(Depends on 7 open bugs, Blocks 8 open bugs)
Details
(Keywords: meta)
Currently a compartment contains exactly one realm (standard-ese for a global and all objects and code associated with it). An object in one realm cannot have a direct reference to an object in another realm. References across realm boundaries are represented as cross-compartment wrappers (CCWs).
The cross-compartment wrapper overhead is sometimes bad, so we're planning to merge compartments that are in the same tab group and are same-origin. Objects in a page will tend to be same-compartment with those in child iframes. The new nesting will be runtimes > zone groups > zones > compartments > realms.
In the new order, the main responsibility of compartments will be security. Security wrappers will continue to exist. Since only same-origin compartments are being merged, the only CCWs removed will be the transparent wrappers we currently insert at the boundary between same-origin compartments.
This will mean changing the implementation and some Web-observable behavior of Window and Location objects and (especially) document.domain.
Many things in various specs require there to be a "current global", so we'll continue to have a cx->global() that's non-null whenever JS could run. JSAutoCompartment will be changed to require a global, not just a JSCompartment*.
Reporter | ||
Updated•8 years ago
|
Summary: [meta] Support multiple globals per compartment → [meta] Support multiple globals per compartment (same-compartment realms)
Updated•8 years ago
|
Blocks: Speedometer_V2
Updated•8 years ago
|
Updated•8 years ago
|
Blocks: TimeToFirstPaint_FB
Updated•8 years ago
|
No longer blocks: TimeToFirstPaint_FB
Updated•7 years ago
|
status-firefox57:
--- → wontfix
Priority: -- → P1
Updated•7 years ago
|
Priority: P1 → P2
Updated•7 years ago
|
Whiteboard: [qf:p1}
Updated•7 years ago
|
Whiteboard: [qf:p1} → [qf:p1]
Updated•7 years ago
|
Whiteboard: [qf:p1] → [qf:i60][qf:p1]
Updated•7 years ago
|
Whiteboard: [qf:i60][qf:p1] → [qf:f60][qf:p1]
Updated•7 years ago
|
Updated•7 years ago
|
Whiteboard: [qf:f60][qf:p1] → [qf:f61][qf:p1]
Updated•7 years ago
|
Whiteboard: [qf:f61][qf:p1] → [qf:f64][qf:p1]
Assignee | ||
Updated•6 years ago
|
Assignee: nobody → jdemooij
Status: NEW → ASSIGNED
Assignee | ||
Updated•6 years ago
|
Alias: same-compartment-realms
Updated•6 years ago
|
Whiteboard: [qf:f64][qf:p1] → [qf:meta]
Updated•6 years ago
|
Assignee | ||
Comment 1•6 years ago
|
||
This has been enabled for chrome code in bug 1512029 and bug 1514210 (Firefox 66) and for more devtools code in bug 1517210 (Firefox 67). We are using this for content since bug 1523843 (Firefox 67). Fingers crossed but so far these changes have stuck.
There has been some follow-up discussion on doing more compartment sharing for content, but that's a much smaller change and shouldn't affect SpiderMonkey (much). In any case, we've disentangled globals and compartments so this bug is FIXED.
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
status-firefox67:
--- → fixed
status-firefox68:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla67
Updated•3 years ago
|
Performance Impact: --- → ?
Whiteboard: [qf:meta]
You need to log in
before you can comment on or make changes to this bug.
Description
•