Bug 1357862 (same-compartment-realms)

[meta] Support multiple globals per compartment (same-compartment realms)

RESOLVED FIXED in Firefox 67

Status

()

enhancement
P2
normal
RESOLVED FIXED
2 years ago
4 days ago

People

(Reporter: jorendorff, Assigned: jandem)

Tracking

(Depends on 7 bugs, Blocks 10 bugs, {meta})

Firefox Tracking Flags

(firefox57 wontfix, firefox67 fixed, firefox68 fixed)

Details

(Whiteboard: [qf:meta])

(Reporter)

Description

2 years ago
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

2 years ago
Depends on: 1363200
(Reporter)

Updated

2 years ago
Depends on: 1363206
(Reporter)

Updated

2 years ago
Depends on: 1363208
(Reporter)

Updated

2 years ago
Depends on: 1363212
(Reporter)

Updated

2 years ago
Depends on: 1363214
(Reporter)

Updated

2 years ago
Summary: [meta] Support multiple globals per compartment → [meta] Support multiple globals per compartment (same-compartment realms)
See Also: → 1186409

Updated

2 years ago
No longer blocks: TimeToFirstPaint_FB

Updated

2 years ago
Blocks: 1338802

Updated

2 years ago
Blocks: 1384970
Priority: -- → P1
Priority: P1 → P2
(Assignee)

Updated

2 years ago
Blocks: 1414387
Whiteboard: [qf:p1}
Whiteboard: [qf:p1} → [qf:p1]

Updated

a year ago
Whiteboard: [qf:p1] → [qf:i60][qf:p1]

Updated

a year ago
Whiteboard: [qf:i60][qf:p1] → [qf:f60][qf:p1]
Depends on: 1434809
Blocks: 1434809
No longer depends on: 1434809

Updated

a year ago
Whiteboard: [qf:f60][qf:p1] → [qf:f61][qf:p1]
Whiteboard: [qf:f61][qf:p1] → [qf:f64][qf:p1]
(Assignee)

Updated

11 months ago
Depends on: 1461938
(Assignee)

Updated

11 months ago
Depends on: 1463163
(Assignee)

Updated

11 months ago
Depends on: 1464134
(Assignee)

Updated

11 months ago
Depends on: 1464374
(Assignee)

Updated

11 months ago
Depends on: 1464772
(Assignee)

Updated

11 months ago
Depends on: 1465002
(Assignee)

Updated

11 months ago
Depends on: 1465037
(Assignee)

Updated

11 months ago
Assignee: nobody → jdemooij
Status: NEW → ASSIGNED
(Assignee)

Updated

11 months ago
Alias: same-compartment-realms
(Assignee)

Updated

11 months ago
Depends on: 1465163
(Assignee)

Updated

11 months ago
Depends on: 1465472
(Assignee)

Updated

11 months ago
Depends on: 1465700
(Assignee)

Updated

11 months ago
Depends on: 1465728
(Assignee)

Updated

11 months ago
Depends on: 1466083
(Assignee)

Updated

11 months ago
Depends on: 1466112
(Assignee)

Updated

11 months ago
Depends on: 1466113
(Assignee)

Updated

11 months ago
Depends on: 1466118
(Assignee)

Updated

11 months ago
Depends on: 1466121
(Assignee)

Updated

11 months ago
Depends on: 1466126
(Assignee)

Updated

11 months ago
Depends on: 1466128
(Assignee)

Updated

11 months ago
Depends on: 1466133
(Assignee)

Updated

11 months ago
Depends on: 1466458
(Assignee)

Updated

11 months ago
Depends on: 1466501
(Assignee)

Updated

11 months ago
Depends on: 1466503
(Assignee)

Updated

11 months ago
Depends on: 1467124
(Assignee)

Updated

11 months ago
Depends on: 1467142

Updated

11 months ago
Whiteboard: [qf:f64][qf:p1] → [qf:meta]
(Assignee)

Updated

10 months ago
Depends on: 1468536
(Assignee)

Updated

10 months ago
Depends on: 1469006
(Assignee)

Updated

10 months ago
Depends on: 1469082
(Assignee)

Updated

10 months ago
Depends on: 1472130
(Assignee)

Updated

10 months ago
Depends on: 1473255
(Assignee)

Updated

10 months ago
Depends on: 1473957
(Assignee)

Updated

9 months ago
Depends on: 1479430
(Assignee)

Updated

8 months ago
No longer depends on: 1363208

Updated

6 months ago
Blocks: 1496514
(Assignee)

Updated

6 months ago
Blocks: 1465980
(Assignee)

Updated

5 months ago
Depends on: 1512029
(Assignee)

Updated

5 months ago
Depends on: 1512260
(Assignee)

Updated

5 months ago
Depends on: 1512410
Depends on: 1513665
(Assignee)

Updated

4 months ago
Depends on: 1514210
(Assignee)

Updated

4 months ago
Depends on: 1515582
(Assignee)

Updated

4 months ago
Depends on: 1516775
(Assignee)

Updated

4 months ago
Depends on: 1517424
(Assignee)

Updated

3 months ago
Depends on: 1518077
(Assignee)

Updated

3 months ago
Depends on: 1518753
(Assignee)

Updated

3 months ago
Depends on: 1519414
(Assignee)

Updated

2 months ago
Depends on: 1527332
(Assignee)

Updated

2 months ago
Depends on: 1530608
(Assignee)

Updated

a month ago
Depends on: 1534214
(Assignee)

Updated

a month ago
Blocks: 907369
(Assignee)

Comment 1

26 days 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
Last Resolved: 26 days ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67
(Assignee)

Updated

4 days ago
Blocks: 1545038
You need to log in before you can comment on or make changes to this bug.