Closed Bug 1444503 Opened 2 years ago Closed 8 months ago

Remove IPC::Principal in favour of directly using nsIPrincipal in IPDL

Categories

(Core :: DOM: Content Processes, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: Nika, Assigned: sstreich)

References

Details

(Whiteboard: [domsecurity-active])

Attachments

(1 file)

since bug 1443956 we can do this now, so let's do it.
Priority: -- → P2
Does this impact PrincipalInfo at all?
(In reply to Ben Kelly [Part-time, not reviewing][:bkelly] from comment #1)
> Does this impact PrincipalInfo at all?

No. PrincipalInfo will continue to exist until nsIPrincipal is threadsafe.
Assignee: nika → streich.mobile
Status: NEW → ASSIGNED

Basti, you could start by looking at PContent.ipdl and for example replace
Principal aTriggeringPrincipal,
with
nsIPrincipal aTriggeringPrincipal,

e.g. within CreateWindow or also within CreateWindowInDifferentProcess.

Then within the actual implementation, e.g. within ContentParent.h/cpp and also ContentChild.h/cpp you can replace the IPC:Principal with nsIPrincipal*.


Removed IPC References in PCContent


Removed IPC References on nsContentPermissionHelper


Remove IPC Principal from PBrowser


Remove IPCPrincipal from the PaymentRequest


Remove IPCPrincipal from the PPresentation


Remove IPC Principal from PNecko

Whiteboard: [domsecurity-active]
Keywords: checkin-needed

Tried to land this but got:
We're sorry, Autoland could not rebase your commits for you automatically. Please manually rebase your commits and try again. (255, "applying /tmp/tmplw55W8\nunable to find 'dom/ipc/TabParent.h' for patching\n(use '--prefix' to apply patch relative to the current directory)\n5 out of 5 hunks FAILED -- saving rejects to file dom/ipc/TabParent.h.rej\nunable to find 'dom/ipc/TabParent.cpp' for patching\n(use '--prefix' to apply patch relative to the current directory)\n8 out of 8 hunks FAILED -- saving rejects to file dom/ipc/TabParent.cpp.rej\nunable to find 'dom/ipc/TabChild.h' for patching\n(use '--prefix' to apply patch relative to the current directory)\n4 out of 4 hunks FAILED -- saving rejects to file dom/ipc/TabChild.h.rej\nunable to find 'dom/ipc/TabChild.cpp' for patching\n(use '--prefix' to apply patch relative to the current directory)\n6 out of 6 hunks FAILED -- saving rejects to file dom/ipc/TabChild.cpp.rej\npatching file dom/ipc/PContent.ipdl\nHunk #11 FAILED at 1115\n1 out of 18 hunks FAILED -- saving rejects to file dom/ipc/PContent.ipdl.rej\npatching file dom/ipc/ContentParent.h\nHunk #3 FAILED at 497\n1 out of 13 hunks FAILED -- saving rejects to file dom/ipc/ContentParent.h.rej\npatching file dom/ipc/ContentParent.cpp\nHunk #14 FAILED at 4657\n1 out of 25 hunks FAILED -- saving rejects to file dom/ipc/ContentParent.cpp.rej\npatching file dom/ipc/ContentChild.h\nHunk #3 FAILED at 550\n1 out of 5 hunks FAILED -- saving rejects to file dom/ipc/ContentChild.h.rej\npatching file dom/ipc/ContentChild.cpp\nHunk #4 FAILED at 3027\n1 out of 9 hunks FAILED -- saving rejects to file dom/ipc/ContentChild.cpp.rej\npatching file dom/base/nsContentPermissionHelper.h\nHunk #1 FAILED at 69\n1 out of 1 hunks FAILED -- saving rejects to file dom/base/nsContentPermissionHelper.h.rej\npatching file dom/base/nsContentPermissionHelper.cpp\nHunk #1 FAILED at 119\nHunk #2 FAILED at 146\nHunk #3 FAILED at 320\n3 out of 3 hunks FAILED -- saving rejects to file dom/base/nsContentPermissionHelper.cpp.rej\nabort: patch failed to apply", '')

Flags: needinfo?(streich.mobile)

I'm Sorry about that.
I fixed the merge conflicts and updated the patch. Should work now :)

Flags: needinfo?(streich.mobile)
Keywords: checkin-needed

Pushed by apavel@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c1b7457b258a
Remove the IPC::Principal r=ckerschb,nika

Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 8 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
Component: IPC → DOM: Content Processes
You need to log in before you can comment on or make changes to this bug.