[webkit-reviews] review granted: [Bug 123644] Removing unnecessary early returns in addTrack, removeTrack and removeRemoteSource methods : [Attachment 215772] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Nov 1 16:08:12 PDT 2013


Darin Adler <darin at apple.com> has granted Thiago de Barros Lacerda
<thiago.lacerda at openbossa.org>'s request for review:
Bug 123644: Removing unnecessary early returns in addTrack, removeTrack and
removeRemoteSource methods
https://bugs.webkit.org/show_bug.cgi?id=123644

Attachment 215772: Patch
https://bugs.webkit.org/attachment.cgi?id=215772&action=review

------- Additional Comments from Darin Adler <darin at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=215772&action=review


r=me because I think this change is OK, but I think we can do better

> Source/WebCore/Modules/mediastream/MediaStream.cpp:166
>      MediaStreamTrackVector* tracks =
getTrackVectorForType(track->source()->type());

If this function is guaranteed to never return null, then it should return a
reference rather than a pointer. Also, in our coding style we do not use the
word “get” for a function with a return value. I’d fix those two things and
then it will be more obvious that this change is correct.


More information about the webkit-reviews mailing list