[webkit-reviews] review granted: [Bug 225575] Remove uses of the String::toInt family of functions from the WebCore/platform directory : [Attachment 428112] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun May 9 10:34:26 PDT 2021


Sam Weinig <sam at webkit.org> has granted Darin Adler <darin at apple.com>'s request
for review:
Bug 225575: Remove uses of the String::toInt family of functions from the
WebCore/platform directory
https://bugs.webkit.org/show_bug.cgi?id=225575

Attachment 428112: Patch

https://bugs.webkit.org/attachment.cgi?id=428112&action=review




--- Comment #2 from Sam Weinig <sam at webkit.org> ---
Comment on attachment 428112
  --> https://bugs.webkit.org/attachment.cgi?id=428112
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=428112&action=review

> Source/WebCore/platform/DateComponents.cpp:108
> +// Does not allow leading or trailing whitespace unlike parseInteger<int>.

This, and just thinking about this more, makes me wonder if the new
`parseInteger<int>` really should be called
`parseIntegerAllowingLeadingWhitespace<int>` to make it clear, and to have
another one that doesn't allow leading whitespace be `parseInteger<int>`. I
would more than a few callers don't actually need that behavior.

>
Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.m
m:1264
> +    return parseIntegerAllowingTrailingJunk<uint64_t>(trackIDString) ==
m_enabledVideoTrackID

Is this correct without the .valueOr(0)?


More information about the webkit-reviews mailing list