WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
225570
Remove uses of the WTF::String::toInt family of functions from WebKit framework sources
https://bugs.webkit.org/show_bug.cgi?id=225570
Summary
Remove uses of the WTF::String::toInt family of functions from WebKit framewo...
Darin Adler
Reported
2021-05-08 18:03:47 PDT
Remove uses of the WTF::String::toInt family of functions from WebKit framework sources
Attachments
Patch
(14.38 KB, patch)
2021-05-08 18:18 PDT
,
Darin Adler
sam
: review+
darin
: commit-queue-
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Darin Adler
Comment 1
2021-05-08 18:18:47 PDT
Created
attachment 428104
[details]
Patch
Sam Weinig
Comment 2
2021-05-08 19:13:58 PDT
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.
Darin Adler
Comment 3
2021-05-08 20:42:57 PDT
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.
Darin Adler
Comment 4
2021-05-08 21:09:25 PDT
Committed
r277239
(
237508@main
): <
https://commits.webkit.org/237508@main
>
Radar WebKit Bug Importer
Comment 5
2021-05-08 21:10:16 PDT
<
rdar://problem/77704010
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug