Hook up systemXHR to permissions manager

RESOLVED FIXED in mozilla17

Status

()

defect
RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: gwagner, Assigned: gwagner)

Tracking

unspecified
mozilla17
x86
macOS
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(blocking-basecamp:+)

Details

Attachments

(1 attachment, 2 obsolete attachments)

No description provided.
blocking-basecamp: --- → ?
Posted patch patch (obsolete) — Splinter Review
Assignee: nobody → anygregor
Posted patch patch (obsolete) — Splinter Review
Attachment #650320 - Attachment is obsolete: true
Attachment #650324 - Flags: review?(philipp)
Comment on attachment 650324 [details] [diff] [review]
patch

Uh I also have to change some tests.
Attachment #650324 - Flags: review?(philipp)
(In reply to Gregor Wagner [:gwagner] from comment #3)
> Uh I also have to change some tests.

Yes you do. Also I'm pretty sure I'm not qualified to review this.
Posted patch patchSplinter Review
Attachment #650324 - Attachment is obsolete: true
Attachment #650396 - Flags: review?(jonas)
blocking-basecamp: ? → +
Comment on attachment 650396 [details] [diff] [review]
patch

Review of attachment 650396 [details] [diff] [review]:
-----------------------------------------------------------------

::: content/base/src/nsXMLHttpRequest.cpp
@@ +581,5 @@
> +      return;
> +
> +    PRUint32 permission;
> +    nsresult rv =
> +      permMgr->TestPermissionFromPrincipal(principal, "systemXHR", &permission);

I think we should use the same permission as for raw TCP sockets here. I'm not sure if we decided a name for that, but something like "networktcp" or some such would work for me.

@@ +586,5 @@
> +    if (NS_FAILED(rv)) {
> +      return;
> +    }
> +
> +    if (permission != nsIPermissionManager::ALLOW_ACTION) {

Just merge these two if-statements.
Attachment #650396 - Flags: review?(jonas) → review+
(In reply to Jonas Sicking (:sicking) from comment #6)
> Comment on attachment 650396 [details] [diff] [review]
> patch
> 
> Review of attachment 650396 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> ::: content/base/src/nsXMLHttpRequest.cpp
> @@ +581,5 @@
> > +      return;
> > +
> > +    PRUint32 permission;
> > +    nsresult rv =
> > +      permMgr->TestPermissionFromPrincipal(principal, "systemXHR", &permission);
> 
> I think we should use the same permission as for raw TCP sockets here. I'm
> not sure if we decided a name for that, but something like "networktcp" or
> some such would work for me.

Followup bug 783716 because that needs gaia changes.
https://hg.mozilla.org/mozilla-central/rev/07d5886658b2
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
With this patch, what's the recommended way to enable systemXHR for testing purposes (on localhost)?
You need to log in before you can comment on or make changes to this bug.