Closed
Bug 1517434
Opened 6 years ago
Closed 6 years ago
Use principal->GetIsSystemPrincipal() in xpc::CreateSandboxObject
Categories
(Core :: XPConnect, enhancement, P3)
Core
XPConnect
Tracking
()
RESOLVED
FIXED
mozilla66
Tracking | Status | |
---|---|---|
firefox66 | --- | fixed |
People
(Reporter: jandem, Assigned: bzbarsky)
References
Details
Attachments
(3 files)
Boris suggested this in bug 1512029: > Maybe file a followup to use principal->GetIsSystemPrincipal() here? Right now it's not very fast, but it could be made better.... We currently do: principal == nsXPConnect::SystemPrincipal() (FWIW nsContentUtils::IsSystemPrincipal doesn't work here because nsContentUtils hasn't been initialized when we create the singleton scopes.)
Updated•6 years ago
|
Priority: -- → P3
Comment 1•6 years ago
|
||
We could add a convenience helper on BasePrincipal that does Kind() == eSystemPrincipal. That would be fastest and cleanest.
![]() |
Assignee | |
Comment 2•6 years ago
|
||
Yes, I have that implemented already. Just waiting on try, because my first attempt discovered some places that had null nsIPrincipal* in non-obvious ways. ;)
Assignee: nobody → bzbarsky
![]() |
Assignee | |
Comment 3•6 years ago
|
||
![]() |
Assignee | |
Comment 4•6 years ago
|
||
![]() |
Assignee | |
Comment 5•6 years ago
|
||
Pushed by bzbarsky@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/417769fb3f0f part 1. Add a fast inline nsIPrincipal::IsSystemPrincipal. r=mccr8 https://hg.mozilla.org/integration/autoland/rev/840ea11d3b3e part 2. Convert existing callers of GetIsSystemPrincipal() to IsSystemPrincipal(). r=mccr8 https://hg.mozilla.org/integration/autoland/rev/1853f95c94b1 part 3. Get rid of pointer compares to nsXPConnect::SystemPrincipal. r=mccr8
Comment 7•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/417769fb3f0f https://hg.mozilla.org/mozilla-central/rev/840ea11d3b3e https://hg.mozilla.org/mozilla-central/rev/1853f95c94b1
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox66:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla66
You need to log in
before you can comment on or make changes to this bug.
Description
•