The default bug view has changed. See this FAQ.

Hook up systemXHR to permissions manager

RESOLVED FIXED in mozilla17

Status

()

Core
DOM: Device Interfaces
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: gwagner, Assigned: gwagner)

Tracking

(Blocks: 1 bug)

unspecified
mozilla17
x86
Mac OS X
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(blocking-basecamp:+)

Details

Attachments

(1 attachment, 2 obsolete attachments)

Comment hidden (empty)
(Assignee)

Updated

5 years ago
blocking-basecamp: --- → ?
(Assignee)

Comment 1

5 years ago
Created attachment 650320 [details] [diff] [review]
patch
Assignee: nobody → anygregor
(Assignee)

Comment 2

5 years ago
Created attachment 650324 [details] [diff] [review]
patch
Attachment #650320 - Attachment is obsolete: true
(Assignee)

Updated

5 years ago
Attachment #650324 - Flags: review?(philipp)
(Assignee)

Comment 3

5 years ago
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.
(Assignee)

Comment 5

5 years ago
Created attachment 650396 [details] [diff] [review]
patch
Attachment #650324 - Attachment is obsolete: true
(Assignee)

Updated

5 years ago
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+
(Assignee)

Comment 7

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/07d5886658b2
(Assignee)

Comment 8

5 years ago
(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
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17

Comment 10

5 years ago
With this patch, what's the recommended way to enable systemXHR for testing purposes (on localhost)?
Blocks: 749372
You need to log in before you can comment on or make changes to this bug.