Closed Bug 781331 Opened 12 years ago Closed 12 years ago

Hook up systemXHR to permissions manager

Categories

(Core :: DOM: Device Interfaces, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla17
blocking-basecamp +

People

(Reporter: gwagner, Assigned: gwagner)

References

Details

Attachments

(1 file, 2 obsolete files)

      No description provided.
blocking-basecamp: --- → ?
Attached patch patch (obsolete) — Splinter Review
Assignee: nobody → anygregor
Attached 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.
Attached 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: 12 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.

Attachment

General

Created:
Updated:
Size: