[webkit-reviews] review granted: [Bug 225570] Remove uses of the WTF::String::toInt family of functions from WebKit framework sources : [Attachment 428104] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat May 8 19:13:58 PDT 2021


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

Attachment 428104: Patch

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




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

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

>
Source/WebKit/Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceEntryPoint.
mm:88
> -    clientSDKVersion = charactersToUIntStrict(reinterpret_cast<const
LChar*>(string), string ? std::strlen(string) : 0, &ok);
> -    return ok;
> +    auto version =
parseIntegerAllowingTrailingJunk<uint32_t>(xpc_dictionary_get_string(m_initiali
zerMessage, "client-sdk-version"));
> +    clientSDKVersion = version.valueOr(0);
> +    return version.hasValue();

It's not immediately clear to me why the AllowingTrailingJunk version is needed
here.


More information about the webkit-reviews mailing list