Closed Bug 514415 Opened 15 years ago Closed 15 years ago

Expose NetUtil's reference to nsIIOService

Categories

(Core :: Networking, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.3a1

People

(Reporter: rflint, Assigned: rflint)

Details

(Keywords: dev-doc-complete)

Attachments

(1 file, 1 obsolete file)

Attached 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.
Attached 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
Closed: 15 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.

Attachment

General

Created:
Updated:
Size: