[Webkit-unassigned] [Bug 158873] WebRTC: RTCIceCandidate init dictionary don't handle explicit null or undefined values correctly

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jun 20 03:02:56 PDT 2016


https://bugs.webkit.org/show_bug.cgi?id=158873

--- Comment #5 from Adam Bergkvist <adam.bergkvist at ericsson.com> ---
(In reply to comment #2)
> Comment on attachment 281562 [details]
> Proposed patch

Thanks for the reviews

> View in context:
> https://bugs.webkit.org/attachment.cgi?id=281562&action=review
> 
> > Source/WebCore/ChangeLog:8
> > +        Prevent explicit null and undefined values to be converted to "null" and "undefined" strings.
> 
> Nit: "values to be converted to" -> "values from being converted to"

Fixed.

(In reply to comment #3)
> Comment on attachment 281562 [details]
> Proposed patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=281562&action=review
> 
> > Source/WebCore/Modules/mediastream/RTCIceCandidate.cpp:59
> > +    if (dictionary.getWithUndefinedOrNullCheck("sdpMLineIndex", sdpMLineIndexString)) {
> > +        if (!sdpMLineIndexString.isNull()) {
> 
> I think you can join the 2 ifs in just one with an and condition. Also check
> if getWithUndefinedOrNullCheck returns false if undefined or null, maybe we
> do not need the second condition.

Dug a bit deeper and getWithUndefinedOrNullCheck() returns false if the dictionary member was undefined or false; rendering the second check is unnecessary. Fixed.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160620/c57cdbcf/attachment-0001.html>


More information about the webkit-unassigned mailing list