| Summary: | Remove uses of the WTF::String::toInt family of functions from WebKit framework sources | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Darin Adler <darin> | ||||
| Component: | WebKit Misc. | Assignee: | Darin Adler <darin> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | cdumez, cgarcia, ews-watchlist, sam, webkit-bug-importer | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | WebKit Nightly Build | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Attachments: |
|
||||||
|
Description
Darin Adler
2021-05-08 18:03:47 PDT
Created attachment 428104 [details]
Patch
Comment on attachment 428104 [details] 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_initializerMessage, "client-sdk-version")); > + clientSDKVersion = version.valueOr(0); > + return version.hasValue(); It's not immediately clear to me why the AllowingTrailingJunk version is needed here. Comment on attachment 428104 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=428104&action=review >> Source/WebKit/Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceEntryPoint.mm:88 >> + return version.hasValue(); > > It's not immediately clear to me why the AllowingTrailingJunk version is needed here. Oops, a mistake. Will fix before landing. Committed r277239 (237508@main): <https://commits.webkit.org/237508@main> |