Changeset 256030 in webkit


Ignore:
Timestamp:
Feb 7, 2020 10:10:04 AM (4 years ago)
Author:
youenn@apple.com
Message:

Mandate UUID version 4 for mDNS ICE candidates
https://bugs.webkit.org/show_bug.cgi?id=207329
<rdar://problem/59221606>

Address post-commit comments from Darin by using isASCIIHexDigit.

Unreviewed.

  • wtf/UUID.cpp:

(WTF::isVersion4UUID):
(WTF::isHexadecimalCharacter): Deleted.

Location:
trunk/Source/WTF
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r256016 r256030  
     12020-02-07  youenn fablet  <youenn@apple.com>
     2
     3        Mandate UUID version 4 for mDNS ICE candidates
     4        https://bugs.webkit.org/show_bug.cgi?id=207329
     5        <rdar://problem/59221606>
     6
     7        Address post-commit comments from Darin by using isASCIIHexDigit.
     8
     9        Unreviewed.
     10
     11        * wtf/UUID.cpp:
     12        (WTF::isVersion4UUID):
     13        (WTF::isHexadecimalCharacter): Deleted.
     14
    1152020-02-07  youenn fablet  <youenn@apple.com>
    216
  • trunk/Source/WTF/wtf/UUID.cpp

    r256016 r256030  
    3333
    3434#include <mutex>
     35#include <wtf/ASCIICType.h>
    3536#include <wtf/CryptographicallyRandomNumber.h>
    3637#include <wtf/HexNumber.h>
     
    8283}
    8384
    84 static inline bool isHexadecimalCharacter(UChar character)
    85 {
    86     return (character >= '0' && character <= '9')
    87         || (character >= 'a' && character <= 'f')
    88         || (character >= 'A' && character <= 'F');
    89 }
    90 
    9185bool isVersion4UUID(StringView value)
    9286{
     
    112106            continue;
    113107        }
    114         if (!isHexadecimalCharacter(value[cptr]))
     108        if (!isASCIIHexDigit(value[cptr]))
    115109            return false;
    116110    }
Note: See TracChangeset for help on using the changeset viewer.