Closed Bug 1465700 Opened 6 years ago Closed 5 years ago

Remove JS_DeprecatedGetCompartmentPrincipals

Categories

(Core :: JavaScript Engine, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
mozilla67
Tracking Status
firefox63 --- wontfix
firefox64 --- wontfix
firefox65 --- wontfix
firefox66 --- wontfix
firefox67 --- fixed

People

(Reporter: jandem, Assigned: bzbarsky)

References

Details

Attachments

(1 file)

Bug 1464374 replaced most JS_GetCompartmentPrincipals calls with JS::GetRealmPrincipals, but there are a few more complicated ones left.

This is a blocker for the Gecko changes. On the JS engine side we can work around it by release-asserting single-realm and then just returning that realm's principals.
Priority: -- → P2
Depends on: 1472976
Depends on: 1482423
On top of the patches in the dependent bugs, the main user now is xpc::GetCompartmentPrincipal, and at this point that's called by:

* AccessCheck::subsumes
* AccessCheck::subsumesConsideringDomain
* AccessCheck::subsumesConsideringDomainIgnoringFPD

None of these have a *ton* of callers so hopefully this won't be too hard to fix..

(There are also two JS_GetCompartmentPrincipals calls in WindowDestroyedEvent.cpp, for the wrapper nuking, but these are probably easier to deal with.)
Depends on: 1482835
Depends on: 1491299
Depends on: 1491323
Depends on: 1491342
Depends on: 1492759
Once the dependent bugs are all fixed the remaining uses will be:

1) js::CompartmentsWithPrincipals::match, this is used in the document.domain code with RecomputeWrappers and that will go away at some point.

2) xpc::GetCompartmentPrincipal. The remaining callers of that are AccessCheck::subsumesConsideringDomain{IgnoringFPD} and these are now only used in the wrapping code. These calls will also go away with the other Gecko changes.
Summary: Remove JS_GetCompartmentPrincipals → Remove JS_DeprecatedGetCompartmentPrincipals
Depends on: 1514049
Pushed by bzbarsky@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/526f7b418884
Remove the now-unused JS_DeprecatedGetCompartmentPrincipals API.  r=jandem
Assignee: nobody → bzbarsky
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: