Closed Bug 532146 Opened 15 years ago Closed 15 years ago

NetUtil.jsm needs a helper for creating new channels

Categories

(Core :: Networking, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.3a1

People

(Reporter: dietrich, Assigned: sdwilsh)

References

Details

(Keywords: dev-doc-complete)

Attachments

(1 file, 3 obsolete files)

      No description provided.
Assignee: nobody → sdwilsh
Depends on: 532143
This should take a string uri, an nsIURI, or an nsIFile, right?
Yes.
What's wrong with NS_NewChannel in nsNetUtil.h?  Are you asking for a JS or C++ interface here?
(In reply to comment #3)
> What's wrong with NS_NewChannel in nsNetUtil.h?  Are you asking for a JS or C++
> interface here?
NetUtil.jsm is for JavaScript.  C++ has all sorts of nice helpers, but JavaScript isn't so lucky.  I've been slowly fixing this.
Attached patch v1.0 (obsolete) — Splinter Review
Attachment #415506 - Flags: superreview?(vladimir)
Attachment #415506 - Flags: review?(bzbarsky)
Whiteboard: [needs review asuth][needs sr vlad]
Whiteboard: [needs review asuth][needs sr vlad] → [needs review bz][needs sr vlad]
Comment on attachment 415506 [details] [diff] [review]
v1.0

Maybe s/aSpecifier/aURISpec/ and be done with it?
Attachment #415506 - Flags: review?(bzbarsky) → review+
(In reply to comment #6)
> (From update of attachment 415506 [details] [diff] [review])
> Maybe s/aSpecifier/aURISpec/ and be done with it?
That doesn't describe an nsIFile though, right?
Whiteboard: [needs review bz][needs sr vlad] → [needs sr vlad]
It describes it at least as well as aSpecifier does.  My other thoughts had been along the lines of aTarget or aThingieToLoad....
aWhatToLoad?
(In reply to comment #9)
> aWhatToLoad?
Sold.
Summary: NetUtil needs a helper for creating new channels → NetUtil.jsm needs a helper for creating new channels
Attached patch v1.1 (obsolete) — Splinter Review
Name change plus an additional test I should have had in the first place.
Attachment #415506 - Attachment is obsolete: true
Attachment #415511 - Flags: superreview?(vladimir)
Attachment #415506 - Flags: superreview?(vladimir)
Attachment #415511 - Flags: superreview?(vladimir) → superreview+
Whiteboard: [needs sr vlad]
Attached patch v1.2 (obsolete) — Splinter Review
For checkin (with commit message)
Attachment #415511 - Attachment is obsolete: true
Flags: in-testsuite+
Keywords: checkin-needed
Whiteboard: [can land]
Target Milestone: --- → mozilla1.9.3a1
Blocks: 532147
Keywords: dev-doc-needed
http://hg.mozilla.org/mozilla-central/rev/fb25cd2cc1d6
Status: NEW → RESOLVED
Closed: 15 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Whiteboard: [can land]
backed out due to test failure
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Attached patch v1.3Splinter Review
This should fix the test issues.
Attachment #415674 - Attachment is obsolete: true
Keywords: checkin-needed
http://hg.mozilla.org/mozilla-central/rev/404e56019315
Status: REOPENED → RESOLVED
Closed: 15 years ago15 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
(In reply to comment #17)
> Updated the docs here:
> 
> https://developer.mozilla.org/en/JavaScript_code_modules/NetUtil.jsm
There seems to be a wiki error in the section that would cover this.
Oops. Fixed.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: