Closed Bug 1465700 Opened Last year Closed 8 months ago

Remove JS_DeprecatedGetCompartmentPrincipals


(Core :: JavaScript Engine, enhancement, P2)




Tracking Status
firefox63 --- wontfix
firefox64 --- wontfix
firefox65 --- wontfix
firefox66 --- wontfix
firefox67 --- fixed


(Reporter: jandem, Assigned: bzbarsky)




(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
Remove the now-unused JS_DeprecatedGetCompartmentPrincipals API.  r=jandem
Assignee: nobody → bzbarsky
Closed: 8 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67
You need to log in before you can comment on or make changes to this bug.