Expose NetUtil's reference to nsIIOService

RESOLVED FIXED in mozilla1.9.3a1

Status

()

defect
RESOLVED FIXED
10 years ago
10 years ago

People

(Reporter: rflint, Assigned: rflint)

Tracking

({dev-doc-complete})

unspecified
mozilla1.9.3a1
Points:
---
Bug Flags:
in-testsuite +
in-litmus -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

Posted patch Patch (obsolete) — Splinter Review
Don't know if we should just mirror the nsIIOService interface on NetUtil instead, but anything that makes it so I'm not importing both NetUtil and fetching and caching my own reference to nsIIOService is good enough my purposes :)
Attachment #398381 - Flags: review?(bzbarsky)
Why not ioService?
(In reply to comment #1)
> Why not ioService?

Verbosity and ios' frequent appearance as a variable name in JS: http://mxr.mozilla.org/mozilla-central/search?string=ios.&find=\.js&findi=\.js&filter=^[^\0]*%24&hitlimit=&tree=mozilla-central

Which would you prefer?
I'd prefer ioService, but this might be a question better asked of someone more familiar with our JS api conventions.
Posted patch PatchSplinter Review
IRC concurs.
Attachment #398381 - Attachment is obsolete: true
Attachment #398507 - Flags: review?(bzbarsky)
Attachment #398381 - Flags: review?(bzbarsky)
Comment on attachment 398507 [details] [diff] [review]
Patch

I'm betting bz is fine with me reviewing this code since I've touched pretty much all of it.  Moving him to sr since this is a new API addition.

>+    /**
>+     * Returns a reference to nsIIOService.
>+     */
nit: @return a reference to nsIIOService.

>+    get ioService() {
>+        return ioService;
>+    },
I wonder if we should just do defineGetter on this object instead of globally (and update references elsewhere).  Seems like less indirection, but I don't care either way.

r=sdwilsh
Attachment #398507 - Flags: superreview?(bzbarsky)
Attachment #398507 - Flags: review?(bzbarsky)
Attachment #398507 - Flags: review+
Attachment #398507 - Flags: superreview?(bzbarsky) → superreview+
http://hg.mozilla.org/mozilla-central/rev/f2f941b8bff8
Status: ASSIGNED → RESOLVED
Last Resolved: 10 years ago
Flags: in-testsuite+
Flags: in-litmus-
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a1
You need to log in before you can comment on or make changes to this bug.