Closed
Bug 799892
Opened 13 years ago
Closed 13 years ago
DataChannelConnection::SendBlob can return nsresult instead of int32_t
Categories
(Core :: WebRTC: Networking, defect)
Core
WebRTC: Networking
Tracking
()
RESOLVED
FIXED
mozilla19
People
(Reporter: ayg, Assigned: ayg)
References
Details
(Whiteboard: [qa-])
Attachments
(1 file)
1.25 KB,
patch
|
mcmanus
:
review+
|
Details | Diff | Splinter Review |
Bug 729512 added netwerk/sctp/datachannel/DataChannel.cpp, which contains DataChannelConnection::SendBlob, which has return type int32_t. It contains the following:
nsresult rv = NS_ReadInputStreamToString(aBlob, *temp, len);
NS_ENSURE_SUCCESS(rv, rv);
This is an error -- it will return rv, which is an nsresult. I don't see any docs at a quick glance, but I'm guessing the return type is meant to be the number of bytes sent, so 0 is the right thing to return in case of error. An error nsresult winds up being negative when converted silently to int32_t, which probably isn't intended.
This doesn't compile when nsresult is converted to enum class (bug 779473).
Assignee | ||
Comment 1•13 years ago
|
||
Given that we've been asked to cut back on try runs to conserve resources for the time being, I don't think this needs a try push. Let me know if you'd like one (or if you'd like the patch done differently).
Attachment #669913 -
Flags: review?(mcmanus)
Updated•13 years ago
|
Attachment #669913 -
Flags: review?(mcmanus) → review+
Assignee | ||
Comment 2•13 years ago
|
||
Flags: in-testsuite-
Comment 3•13 years ago
|
||
Comment on attachment 669913 [details] [diff] [review]
Patch
Thanks, Aryeh. Cut-and-paste error when copying code from WebSockets, where it was used in a slightly different context.
Comment 4•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla19
Updated•13 years ago
|
Whiteboard: [qa-]
You need to log in
before you can comment on or make changes to this bug.
Description
•