Closed Bug 217433 Opened 22 years ago Closed 21 years ago

make datachannel support suspend/resume

Categories

(Core :: Networking, defect, P1)

x86
Linux
defect

Tracking

()

RESOLVED FIXED
mozilla1.6alpha

People

(Reporter: Biesinger, Assigned: Biesinger)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 3 obsolete files)

Currently, the data channel doesn't support suspending/resuming... would be good if it did, at least during OnStartRequest.
Attached patch patch (obsolete) — Splinter Review
Status: NEW → ASSIGNED
Priority: -- → P1
Target Milestone: --- → mozilla1.6alpha
hmm... looks more complicated then it should need to be :( let me think about this one some....
ok, since mDataStream is the input end of a pipe, it supports nsIAsyncInputStream. as a result, it will work well with nsIInputStreamPump, which supports all the Suspend,Resume,nsIStreamListener semantics that we want here. i think it would be better to utilize nsIInputStreamPump here (probably less code too).
Attached patch use nsIInputStreamPump (obsolete) — Splinter Review
unfortunately, this does not quite work yet... for some reason, I get JS Errors from chrome, because one request can't be QId to nsIChannel...
Attachment #130459 - Attachment is obsolete: true
Comment on attachment 130459 [details] [diff] [review] patch marking review- per above comments
Attachment #130459 - Flags: review?(darin) → review-
make sure the nsIRequest corresponding to the input stream pump is not getting leaked out of the data channel. callbacks from the data channel must pass a nsIRequest that is the data channel.
Attached patch patch (obsolete) — Splinter Review
adding the right request (namely, not the pump) to the loadgroup helped...
Attachment #131273 - Attachment is obsolete: true
Comment on attachment 132694 [details] [diff] [review] patch patch looks good.. two nits: 1- use NS_INPUTSTREAMPUMP_CONTRACTID instead of raw string contract-id. for necko, this is preferred. 2- eliminate use of (void) prefix. personal pet pieve... looks like noise to me. since it seems that you are just preserving it in your patch, i'm hopeful that you won't object ;) r=darin
Attachment #132694 - Flags: review?(darin) → review+
Attached patch nits fixedSplinter Review
Attachment #132694 - Attachment is obsolete: true
Attachment #132959 - Flags: superreview?(bzbarsky)
Comment on attachment 132959 [details] [diff] [review] nits fixed sr=bzbarsky
Attachment #132959 - Flags: superreview?(bzbarsky) → superreview+
Checking in src/nsDataChannel.cpp; /cvsroot/mozilla/netwerk/protocol/data/src/nsDataChannel.cpp,v <-- nsDataChannel.cpp new revision: 1.67; previous revision: 1.66 done Checking in src/nsDataChannel.h; /cvsroot/mozilla/netwerk/protocol/data/src/nsDataChannel.h,v <-- nsDataChannel.h new revision: 1.22; previous revision: 1.21 done
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: