Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(927)

Issue 1304063006: (try 2) Added send-thresholding and fixed text packet dumping (Closed)

Created:
5 years, 3 months ago by lally1
Modified:
5 years, 3 months ago
CC:
webrtc-reviews_webrtc.org
Base URL:
https://chromium.googlesource.com/external/webrtc.git@master
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

Added send-thresholding and fixed text packet dumping. Also a little squelch for the over-max-MTU log spam we see in there. BUG=https://code.google.com/p/webrtc/issues/detail?id=4468 R=pthatcher@chromium.org, tommi@webrtc.org Committed: https://chromium.googlesource.com/external/webrtc/+/e8386d21992b6683b6fadd315ea631875b4256fb

Patch Set 1 : Post-revert fixes. No more static vars. #

Total comments: 33

Patch Set 2 : Post tommi@ comments. #

Total comments: 17

Patch Set 3 : Simplification of GetChannelFromSocket, and a dcheck moved. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+112 lines, -9 lines) Patch
M talk/media/sctp/sctpdataengine.h View 1 4 chunks +9 lines, -2 lines 0 comments Download
M talk/media/sctp/sctpdataengine.cc View 1 2 10 chunks +74 lines, -7 lines 0 comments Download
M talk/media/sctp/sctpdataengine_unittest.cc View 4 chunks +29 lines, -0 lines 0 comments Download

Messages

Total messages: 14 (2 generated)
lally1
Hi, moved from https://codereview.webrtc.org/1266033005/
5 years, 3 months ago (2015-08-27 21:11:42 UTC) #3
tommi
Thanks Lally. Took a look and have some suggestions questions (and found one bug). https://codereview.webrtc.org/1304063006/diff/20001/talk/media/sctp/sctpdataengine.cc ...
5 years, 3 months ago (2015-08-28 11:44:04 UTC) #4
lally1
https://codereview.webrtc.org/1304063006/diff/20001/talk/media/sctp/sctpdataengine.cc File talk/media/sctp/sctpdataengine.cc (right): https://codereview.webrtc.org/1304063006/diff/20001/talk/media/sctp/sctpdataengine.cc#newcode265 talk/media/sctp/sctpdataengine.cc:265: LOG(LS_ERROR) << "Got different send size than expected: " ...
5 years, 3 months ago (2015-08-28 17:54:49 UTC) #5
tommi
Thanks Lally. lgtm. https://codereview.webrtc.org/1304063006/diff/40001/talk/media/sctp/sctpdataengine.cc File talk/media/sctp/sctpdataengine.cc (right): https://codereview.webrtc.org/1304063006/diff/40001/talk/media/sctp/sctpdataengine.cc#newcode263 talk/media/sctp/sctpdataengine.cc:263: // This is harmless, but we ...
5 years, 3 months ago (2015-08-28 18:12:32 UTC) #6
pthatcher2
https://codereview.webrtc.org/1304063006/diff/40001/talk/media/sctp/sctpdataengine.cc File talk/media/sctp/sctpdataengine.cc (right): https://codereview.webrtc.org/1304063006/diff/40001/talk/media/sctp/sctpdataengine.cc#newcode332 talk/media/sctp/sctpdataengine.cc:332: DCHECK(naddrs > 0); On 2015/08/28 18:12:32, tommi (webrtc) wrote: ...
5 years, 3 months ago (2015-08-28 18:36:59 UTC) #7
pthatcher2
https://codereview.webrtc.org/1304063006/diff/40001/talk/media/sctp/sctpdataengine.cc File talk/media/sctp/sctpdataengine.cc (right): https://codereview.webrtc.org/1304063006/diff/40001/talk/media/sctp/sctpdataengine.cc#newcode332 talk/media/sctp/sctpdataengine.cc:332: DCHECK(naddrs > 0); On 2015/08/28 18:36:59, pthatcher2 wrote: > ...
5 years, 3 months ago (2015-08-28 18:38:15 UTC) #8
pthatcher2
https://codereview.webrtc.org/1304063006/diff/40001/talk/media/sctp/sctpdataengine.cc File talk/media/sctp/sctpdataengine.cc (right): https://codereview.webrtc.org/1304063006/diff/40001/talk/media/sctp/sctpdataengine.cc#newcode337 talk/media/sctp/sctpdataengine.cc:337: if (naddrs > 0) { Huh? Why check naddrs ...
5 years, 3 months ago (2015-08-28 18:40:44 UTC) #9
pthatcher2
lgtm, assuming you fix the nits. https://codereview.webrtc.org/1304063006/diff/40001/talk/media/sctp/sctpdataengine.cc File talk/media/sctp/sctpdataengine.cc (right): https://codereview.webrtc.org/1304063006/diff/40001/talk/media/sctp/sctpdataengine.cc#newcode342 talk/media/sctp/sctpdataengine.cc:342: if (addrs[0].sa_family == ...
5 years, 3 months ago (2015-08-28 18:44:49 UTC) #10
lally1
Thanks, anything else? https://codereview.webrtc.org/1304063006/diff/40001/talk/media/sctp/sctpdataengine.cc File talk/media/sctp/sctpdataengine.cc (right): https://codereview.webrtc.org/1304063006/diff/40001/talk/media/sctp/sctpdataengine.cc#newcode263 talk/media/sctp/sctpdataengine.cc:263: // This is harmless, but we ...
5 years, 3 months ago (2015-08-28 18:53:11 UTC) #11
lally1
Ah, missed that second LGTM. Thanks everyone. Submitting.
5 years, 3 months ago (2015-08-28 18:54:34 UTC) #12
lally1
Committed patchset #3 (id:60001) manually as e8386d21992b6683b6fadd315ea631875b4256fb (presubmit successful).
5 years, 3 months ago (2015-08-28 18:54:50 UTC) #13
tommi
5 years, 3 months ago (2015-08-28 19:40:33 UTC) #14
Message was sent while issue was closed.
On 2015/08/28 18:36:59, pthatcher2 wrote:
>
https://codereview.webrtc.org/1304063006/diff/40001/talk/media/sctp/sctpdatae...
> File talk/media/sctp/sctpdataengine.cc (right):
> 
>
https://codereview.webrtc.org/1304063006/diff/40001/talk/media/sctp/sctpdatae...
> talk/media/sctp/sctpdataengine.cc:332: DCHECK(naddrs > 0);
> On 2015/08/28 18:12:32, tommi (webrtc) wrote:
> > Generally in chromium (the guidelines webrtc follows), a DCHECK is used to
> > assert and document expectations.  The condition in the DCHECK is then not
> > repeated in the production code.  The reason for this is that the DCHECK
> should
> > have caught unexpected situations and if we encounter those unexpected
> > situations out in the field, the code should just crash.
> > 
> > So, should we move this DCHECK down below the check in line 333 and remove
the
> > if (naddres > 0)?
> > 
> > It's up to you, I'm not hung up on it.
> 
> On the other hand, there is a ton of code in WebRTC that looks like this:
> 
> if (naddrs < 0) {
>   ASSERT(false);
>   return nullptr;
> }
> 
> And DCHECK is just the rename ASSERT, and so there is already much code that
> looks like this:
> 
> 
> if (naddrs < 0) {
>   DCHECK(false);
>   return nullptr;
> }
> 
> Peronally, I like it that way.

Yes, that's why I'm fine with this as is.  In Chromium it's less optional :)
I didn't like it at first myself actually but have seen the benefit of that
approach several times since then.

Powered by Google App Engine
This is Rietveld 408576698