Closed
Bug 803765
Opened 12 years ago
Closed 12 years ago
Document aRequestPrincipal in nsIContentPolicy.idl
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla19
People
(Reporter: devd, Assigned: devd)
References
Details
(Keywords: addon-compat, dev-doc-needed)
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
devd
:
review+
|
Details | Diff | Splinter Review |
Bug 767134 didn't add documentation. Add required documentation. This might also mean more crisply defining what the aRequestPrincipal should be for all the contentpolicy calls.
Assignee | ||
Updated•12 years ago
|
Assignee: nobody → dev.akhawe+mozilla
Assignee | ||
Comment 1•12 years ago
|
||
Assignee | ||
Updated•12 years ago
|
Attachment #673500 -
Flags: review?(bzbarsky)
Assignee | ||
Comment 2•12 years ago
|
||
First attempt. Not sure what the documentation etiquette is, but I am sure the review will point me towards the right path.
Comment 3•12 years ago
|
||
Comment on attachment 673500 [details] [diff] [review]
Documentation for aRequestPrincipal
>+ * inapplicable. Note that loads caused by data:
>+ * and about: iframes pass the iframe URI as the
>+ * requestOrigin, but the iframe inherits the
>+ * principal from the parent by default.
Is this necessarily true? I think this is true for navigation, but not for, say, an <img> load in such an iframe, since that goes through NS_CheckContentLoadPolicy, which passes in the principal codebase as the location.
Also, javascript: has the same behavior as data:. And about: generally does not; about:blank is special.
>+ * argument. Currently, not set for any loads other
>+ * navigation events.
"other than"?
But this seems to not be the case; anything using NS_CheckContentLoadPolicy is passing in a principal.
r=me with the above fixed.
Attachment #673500 -
Flags: review?(bzbarsky) → review+
Assignee | ||
Comment 4•12 years ago
|
||
Assignee | ||
Updated•12 years ago
|
Attachment #673500 -
Attachment is obsolete: true
Assignee | ||
Comment 5•12 years ago
|
||
Comment on attachment 674542 [details] [diff] [review]
Documentation for aRequestPrincipal
r=bz
Carrying over the r+ from bz.
@bz: If you have time to take a look and confirm that the documentation looks right, that would be great. I will wait for a couple of days before requesting check-in.
Attachment #674542 -
Flags: review+
Comment 6•12 years ago
|
||
Looks reasonable.
Assignee | ||
Updated•12 years ago
|
Keywords: checkin-needed
Comment 7•12 years ago
|
||
Keywords: checkin-needed
Comment 8•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Target Milestone: --- → mozilla19
Comment 9•12 years ago
|
||
In which cases would the caller be non-gecko code?
Assignee | ||
Comment 10•12 years ago
|
||
Any extension (e.g., noscript, adblock)
There might be other cases. bz/dveditz probably know more.
Comment 11•12 years ago
|
||
Is there a bug to go through the code and add the Request Principal in gecko code when it's missing?
Assignee | ||
Comment 12•12 years ago
|
||
If I am not wrong, Gecko code should be using NS_CheckContentLoadPolicy anyways, and that should set the requestprincipal properly. Can you point me to examples where it's missing?
You need to log in
before you can comment on or make changes to this bug.
Description
•