Closed
Bug 1443956
Opened 7 years ago
Closed 7 years ago
Support directly using nsIURI and nsIPrincipal in IPDL
Categories
(Core :: DOM: Core & HTML, enhancement, P2)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla61
Tracking | Status | |
---|---|---|
firefox61 | --- | fixed |
People
(Reporter: nika, Assigned: nika)
References
Details
Attachments
(2 files)
1.66 KB,
patch
|
froydnj
:
review+
|
Details | Diff | Splinter Review |
3.82 KB,
patch
|
froydnj
:
review+
|
Details | Diff | Splinter Review |
With bug 1443954, the ability to directly use refcounted types in IPDL will be added.
We should use this capability to allow nsIURI and nsIPrincipal to be embedded directly in IPDL structs and used as IPDL arguments.
Assignee | ||
Comment 1•7 years ago
|
||
MozReview-Commit-ID: 1QWdw1qzcmR
Attachment #8957008 -
Flags: review?(nfroyd)
Assignee | ||
Comment 2•7 years ago
|
||
MozReview-Commit-ID: 5XnyVyMceuy
Attachment #8957009 -
Flags: review?(nfroyd)
Updated•7 years ago
|
Attachment #8957008 -
Flags: review?(nfroyd) → review+
Comment 3•7 years ago
|
||
Comment on attachment 8957009 [details] [diff] [review]
Part 2: Support serializing nsIPrincipal directly over IPDL
Review of attachment 8957009 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/ipc/PermissionMessageUtils.cpp
@@ -22,3 @@
> nsCString principalString;
> - nsCOMPtr<nsISerializable> serializable = do_QueryInterface(aParam.mPrincipal);
> - if (serializable) {
Hah, we've been doing this completely unnecessary QI check for sooo long. :(
::: dom/ipc/PermissionMessageUtils.h
@@ +20,5 @@
> + static bool Read(const Message* aMsg, PickleIterator* aIter, RefPtr<nsIPrincipal>* aResult);
> +};
> +
> +/**
> + * Legacy IPC::Principal type. Use nsIPrincipal directly in new IPDL code.
Do we have a bug on file to nuke this?
Attachment #8957009 -
Flags: review?(nfroyd) → review+
Updated•7 years ago
|
Priority: -- → P2
Updated•7 years ago
|
Blocks: browsingcontext
Comment 4•7 years ago
|
||
Don't we need these types to be threadsafe first?
Comment 5•7 years ago
|
||
Also, is this serializing CSP data? We have explicitly chosen *not* to propagate this across IPC in PrincipalInfo because we have problems with the data spreading where it should not.
Flags: needinfo?(nika)
Assignee | ||
Comment 6•7 years ago
|
||
(In reply to Ben Kelly [Part-time, not reviewing][:bkelly] from comment #4)
> Don't we need these types to be threadsafe first?
We don't need these types to be threadsafe to use them on the main thread.
---
(In reply to Ben Kelly [Part-time, not reviewing][:bkelly] from comment #5)
> Also, is this serializing CSP data? We have explicitly chosen *not* to
> propagate this across IPC in PrincipalInfo because we have problems with the
> data spreading where it should not.
This serializes the exact same data as IPC::Principal, which happens to include CSP data in its serialization. I think this will probably be changing in bug 965637.
Flags: needinfo?(nika)
Pushed by nika@thelayzells.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/390bb0f184d1
Part 1: Support serializing nsIURI directly over IPDL, r=froydnj
https://hg.mozilla.org/integration/mozilla-inbound/rev/30c42e2e0944
Part 2: Support serializing nsIPrincipal directly over IPDL, r=froydnj
Comment 8•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/390bb0f184d1
https://hg.mozilla.org/mozilla-central/rev/30c42e2e0944
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox61:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•