Closed
Bug 376660
Opened 17 years ago
Closed 17 years ago
[FIX]Unichar stream loader should provide a channel even if there is no data
Categories
(Core :: Networking, defect, P1)
Core
Networking
Tracking
()
RESOLVED
FIXED
mozilla1.9alpha4
People
(Reporter: bzbarsky, Assigned: bzbarsky)
Details
Attachments
(3 files)
1.48 KB,
patch
|
Biesinger
:
review+
Biesinger
:
superreview+
|
Details | Diff | Splinter Review |
1.45 KB,
patch
|
Biesinger
:
review+
|
Details | Diff | Splinter Review |
2.28 KB,
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
Right now, lack of data in the loader means GetChannel() returns null in OnStreamComplete. That doesn't really match the API comments (and bit me, in fact).
Assignee | ||
Updated•17 years ago
|
Priority: -- → P1
Target Milestone: --- → mozilla1.9alpha4
Assignee | ||
Comment 1•17 years ago
|
||
Attachment #260767 -
Flags: superreview?(cbiesinger)
Attachment #260767 -
Flags: review?(cbiesinger)
Comment 2•17 years ago
|
||
Comment on attachment 260767 [details] [diff] [review] Like so makes sense
Attachment #260767 -
Flags: superreview?(cbiesinger)
Attachment #260767 -
Flags: superreview+
Attachment #260767 -
Flags: review?(cbiesinger)
Attachment #260767 -
Flags: review+
Assignee | ||
Comment 3•17 years ago
|
||
Fixed. Should write a unit test...
Status: NEW → RESOLVED
Closed: 17 years ago
Flags: in-testsuite?
Resolution: --- → FIXED
Updated•17 years ago
|
OS: Linux → All
Hardware: PC → All
Assignee | ||
Comment 4•17 years ago
|
||
Attachment #261624 -
Flags: review?(cbiesinger)
Comment 5•17 years ago
|
||
Comment on attachment 261624 [details] [diff] [review] How's this for the test? hm. isn't it a bug that the data is null here? per the API comments it should be null in failure cases, and I don't think an empty string as data is a failure condition.
Assignee | ||
Comment 6•17 years ago
|
||
Hmm.... Allocating a stream for no data seems silly, though. Maybe we should change the comments. ;)
Comment 7•17 years ago
|
||
Comment on attachment 261624 [details] [diff] [review] How's this for the test? OK. please fix the comment or at least file a bug to do so and r=biesi (f seems like an odd name for an nsIUnicharStreamLoader though) a test that actually tests a failure case would be nice too, though (perhaps an http channel for localhost on port 0? or even an invalid port (>65535))
Attachment #261624 -
Flags: review?(cbiesinger) → review+
Assignee | ||
Comment 8•17 years ago
|
||
Checked in test with comments.
Flags: in-testsuite? → in-testsuite+
Comment 9•17 years ago
|
||
Attachment #261867 -
Flags: review?(bzbarsky)
Assignee | ||
Comment 10•17 years ago
|
||
Comment on attachment 261867 [details] [diff] [review] test a failure case too >+ do_test_finished(); Why not call that in done() and avoid eating the exceptions?
Assignee | ||
Comment 11•17 years ago
|
||
Comment on attachment 261867 [details] [diff] [review] test a failure case too r- pending answer to my question
Attachment #261867 -
Flags: review?(bzbarsky) → review-
Comment 12•17 years ago
|
||
Hm... I could, and call do_test_pending just once. But how would that affect whether the exception is eaten?
Assignee | ||
Comment 13•17 years ago
|
||
Then you wouldn't need the try {} around the tests[current_test++]() call, no?
Comment 14•17 years ago
|
||
the try..finally is so that I call do_test_finished even if the do_check_* fail. this is necessary because otherwise the test would hang. (the exception is still thrown)
Assignee | ||
Comment 15•17 years ago
|
||
Oh, that's a finally, not a catch. Nevermind!
Assignee | ||
Updated•17 years ago
|
Attachment #261867 -
Flags: review- → review+
Comment 16•17 years ago
|
||
checked in. Checking in test_bug376660.js; /cvsroot/mozilla/netwerk/test/unit/test_bug376660.js,v <-- test_bug376660.js new revision: 1.2; previous revision: 1.1 done
You need to log in
before you can comment on or make changes to this bug.
Description
•