Closed Bug 1526624 Opened 2 years ago Closed 2 years ago

Fix Xray waivers to deal with multiple globals per compartment

Categories

(Core :: XPConnect, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
mozilla67
Tracking Status
firefox67 --- fixed

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

Details

Attachments

(1 file)

Right now XrayWaiver (note: not XrayWaiverWrapper) wrappers are same-compartment and same-realm with their target. The latter is relied on to have them act with the target's principals.

In the multiple-realms-per-compartment world, we could make them same-realm with the target, but that involves a bit of nasty work on FixWaiverAfterTransplant. Or we can just allow them to be same-compartment but not same-realm (due to transplants), and enter the target's realm before calling on to it. Bobby prefers the latter option.

In the new setup, they are still same-compartment with their target, but may
not be same-realm (due to transplants).

We could make them be same-realm by adjusting FixWaiverAfterTransplant, but
this is conceptually simpler.

Priority: -- → P2
Pushed by bzbarsky@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6c7ae3e0b592
Fix Xray waivers to deal with multiple globals per compartment. r=bholley
Pushed by bzbarsky@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4c37ccc879d7
followup.  Fix clang-format issues in WrapperFactory.  r=me
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67
You need to log in before you can comment on or make changes to this bug.