<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[277249] trunk/Source/WebCore</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/277249">277249</a></dd>
<dt>Author</dt> <dd>darin@apple.com</dd>
<dt>Date</dt> <dd>2021-05-09 11:54:10 -0700 (Sun, 09 May 2021)</dd>
</dl>

<h3>Log Message</h3>
<pre>Remove uses of the String::toInt family of functions from the WebCore/platform directory
https://bugs.webkit.org/show_bug.cgi?id=225575

Second half.

Reviewed by Sam Weinig.

* platform/mediastream/mac/ScreenDisplayCapturerMac.mm:
(WebCore::ScreenDisplayCapturerMac::create): Use parseInteger<uint32_t>
instead of String::toUIntStrict.
(WebCore::ScreenDisplayCapturerMac::screenCaptureDeviceWithPersistentID): Ditto.
* platform/mediastream/mac/WindowDisplayCapturerMac.mm:
(WebCore::WindowDisplayCapturerMac::create): Ditto.
(WebCore::WindowDisplayCapturerMac::windowCaptureDeviceWithPersistentID): Ditto.

* platform/network/HTTPParsers.cpp:
(WebCore::parseRange): Use parseInteger<long long> instead of
String::toInt64Strict. Also use StringView so we don't allocate substrings on
the heap just to parse integers within an existing string. And removed unneeded
call to stripWhiteSpace in one place since parseInteger already allows leading
and trailing spaces, and in another case where we need to strip because of an
empty string check, used stripLeadingAndTrailingHTTPSpaces instead.

* platform/network/ParsedContentRange.cpp:
(WebCore::parseContentRange): Use parseInteger<int64_t> instead of
StringView::toInt64Strict.

* platform/network/ParsedRequestRange.cpp:
(WebCore::ParsedRequestRange::parse): Use parseInteger<uint64_t> instead of
StringView::toUInt64Strict.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreplatformmediastreammacScreenDisplayCapturerMacmm">trunk/Source/WebCore/platform/mediastream/mac/ScreenDisplayCapturerMac.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformmediastreammacWindowDisplayCapturerMacmm">trunk/Source/WebCore/platform/mediastream/mac/WindowDisplayCapturerMac.mm</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkHTTPParserscpp">trunk/Source/WebCore/platform/network/HTTPParsers.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkParsedContentRangecpp">trunk/Source/WebCore/platform/network/ParsedContentRange.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkParsedRequestRangecpp">trunk/Source/WebCore/platform/network/ParsedRequestRange.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (277248 => 277249)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog   2021-05-09 18:39:24 UTC (rev 277248)
+++ trunk/Source/WebCore/ChangeLog      2021-05-09 18:54:10 UTC (rev 277249)
</span><span class="lines">@@ -1,5 +1,38 @@
</span><span class="cx"> 2021-05-09  Darin Adler  <darin@apple.com>
</span><span class="cx"> 
</span><ins>+        Remove uses of the String::toInt family of functions from the WebCore/platform directory
+        https://bugs.webkit.org/show_bug.cgi?id=225575
+
+        Second half.
+
+        Reviewed by Sam Weinig.
+
+        * platform/mediastream/mac/ScreenDisplayCapturerMac.mm:
+        (WebCore::ScreenDisplayCapturerMac::create): Use parseInteger<uint32_t>
+        instead of String::toUIntStrict.
+        (WebCore::ScreenDisplayCapturerMac::screenCaptureDeviceWithPersistentID): Ditto.
+        * platform/mediastream/mac/WindowDisplayCapturerMac.mm:
+        (WebCore::WindowDisplayCapturerMac::create): Ditto.
+        (WebCore::WindowDisplayCapturerMac::windowCaptureDeviceWithPersistentID): Ditto.
+
+        * platform/network/HTTPParsers.cpp:
+        (WebCore::parseRange): Use parseInteger<long long> instead of
+        String::toInt64Strict. Also use StringView so we don't allocate substrings on
+        the heap just to parse integers within an existing string. And removed unneeded
+        call to stripWhiteSpace in one place since parseInteger already allows leading
+        and trailing spaces, and in another case where we need to strip because of an
+        empty string check, used stripLeadingAndTrailingHTTPSpaces instead.
+
+        * platform/network/ParsedContentRange.cpp:
+        (WebCore::parseContentRange): Use parseInteger<int64_t> instead of
+        StringView::toInt64Strict.
+
+        * platform/network/ParsedRequestRange.cpp:
+        (WebCore::ParsedRequestRange::parse): Use parseInteger<uint64_t> instead of
+        StringView::toUInt64Strict.
+
+2021-05-09  Darin Adler  <darin@apple.com>
+
</ins><span class="cx">         Follow-up to: Remove uses of the String::toInt family of functions from the WebCore/platform directory
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=225575
</span><span class="cx"> 
</span><span class="lines">@@ -13,6 +46,8 @@
</span><span class="cx">         Remove uses of the String::toInt family of functions from the WebCore/platform directory
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=225575
</span><span class="cx"> 
</span><ins>+        Accidentally committed only half of it.
+
</ins><span class="cx">         Reviewed by Sam Weinig.
</span><span class="cx"> 
</span><span class="cx">         * platform/DateComponents.cpp: Tweak a comment on the local parseInt function here
</span><span class="lines">@@ -55,30 +90,6 @@
</span><span class="cx">         consider using -[NSString intValue] here with some range checking instead
</span><span class="cx">         of converting to WTF::String.
</span><span class="cx">         
</span><del>-        * platform/mediastream/mac/ScreenDisplayCapturerMac.mm:
-        (WebCore::ScreenDisplayCapturerMac::create): Use parseInteger<uint32_t>
-        instead of String::toUIntStrict.
-        (WebCore::ScreenDisplayCapturerMac::screenCaptureDeviceWithPersistentID): Ditto.
-        * platform/mediastream/mac/WindowDisplayCapturerMac.mm:
-        (WebCore::WindowDisplayCapturerMac::create): Ditto.
-        (WebCore::WindowDisplayCapturerMac::windowCaptureDeviceWithPersistentID): Ditto.
-
-        * platform/network/HTTPParsers.cpp:
-        (WebCore::parseRange): Use parseInteger<long long> instead of
-        String::toInt64Strict. Also use StringView so we don't allocate substrings on
-        the heap just to parse integers within an existing string. And removed unneeded
-        call to stripWhiteSpace in one place since parseInteger already allows leading
-        and trailing spaces, and in another case where we need to strip because of an
-        empty string check, used stripLeadingAndTrailingHTTPSpaces instead.
-
-        * platform/network/ParsedContentRange.cpp:
-        (WebCore::parseContentRange): Use parseInteger<int64_t> instead of
-        StringView::toInt64Strict.
-
-        * platform/network/ParsedRequestRange.cpp:
-        (WebCore::ParsedRequestRange::parse): Use parseInteger<uint64_t> instead of
-        StringView::toUInt64Strict.
-
</del><span class="cx"> 2021-05-09  Darin Adler  <darin@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Remove uses of the String::toInt family of functions from WebCore/html and similar directories
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmediastreammacScreenDisplayCapturerMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/mediastream/mac/ScreenDisplayCapturerMac.mm (277248 => 277249)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mediastream/mac/ScreenDisplayCapturerMac.mm        2021-05-09 18:39:24 UTC (rev 277248)
+++ trunk/Source/WebCore/platform/mediastream/mac/ScreenDisplayCapturerMac.mm   2021-05-09 18:54:10 UTC (rev 277249)
</span><span class="lines">@@ -38,6 +38,7 @@
</span><span class="cx"> #import "PlatformScreen.h"
</span><span class="cx"> #import "RealtimeMediaSourceSettings.h"
</span><span class="cx"> #import "RealtimeVideoUtilities.h"
</span><ins>+#import <wtf/text/StringToIntegerConversion.h>
</ins><span class="cx"> 
</span><span class="cx"> #import "CoreVideoSoftLink.h"
</span><span class="cx"> 
</span><span class="lines">@@ -80,15 +81,12 @@
</span><span class="cx"> 
</span><span class="cx"> Expected<UniqueRef<DisplayCaptureSourceCocoa::Capturer>, String> ScreenDisplayCapturerMac::create(const String& deviceID)
</span><span class="cx"> {
</span><del>-    bool ok;
-    auto displayID = deviceID.toUIntStrict(&ok);
-    if (!ok)
</del><ins>+    auto displayID = parseInteger<uint32_t>(deviceID);
+    if (!displayID)
</ins><span class="cx">         return makeUnexpected("Invalid display device ID"_s);
</span><del>-
-    auto actualDisplayID = updateDisplayID(displayID);
</del><ins>+    auto actualDisplayID = updateDisplayID(*displayID);
</ins><span class="cx">     if (!actualDisplayID)
</span><span class="cx">         return makeUnexpected("Invalid display ID"_s);
</span><del>-
</del><span class="cx">     return UniqueRef<DisplayCaptureSourceCocoa::Capturer>(makeUniqueRef<ScreenDisplayCapturerMac>(actualDisplayID.value()));
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -267,20 +265,18 @@
</span><span class="cx"> 
</span><span class="cx"> Optional<CaptureDevice> ScreenDisplayCapturerMac::screenCaptureDeviceWithPersistentID(const String& deviceID)
</span><span class="cx"> {
</span><del>-    bool ok;
-    auto displayID = deviceID.toUIntStrict(&ok);
-    if (!ok) {
</del><ins>+    auto displayID = parseInteger<uint32_t>(deviceID);
+    if (!displayID) {
</ins><span class="cx">         RELEASE_LOG(WebRTC, "ScreenDisplayCapturerMac::screenCaptureDeviceWithPersistentID: display ID does not convert to 32-bit integer");
</span><span class="cx">         return WTF::nullopt;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    auto actualDisplayID = updateDisplayID(displayID);
</del><ins>+    auto actualDisplayID = updateDisplayID(*displayID);
</ins><span class="cx">     if (!actualDisplayID)
</span><span class="cx">         return WTF::nullopt;
</span><span class="cx"> 
</span><del>-    auto device = CaptureDevice(String::number(actualDisplayID.value()), CaptureDevice::DeviceType::Screen, "ScreenCaptureDevice"_s);
</del><ins>+    auto device = CaptureDevice(String::number(*actualDisplayID), CaptureDevice::DeviceType::Screen, "ScreenCaptureDevice"_s);
</ins><span class="cx">     device.setEnabled(true);
</span><del>-
</del><span class="cx">     return device;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmediastreammacWindowDisplayCapturerMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/mediastream/mac/WindowDisplayCapturerMac.mm (277248 => 277249)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mediastream/mac/WindowDisplayCapturerMac.mm        2021-05-09 18:39:24 UTC (rev 277248)
+++ trunk/Source/WebCore/platform/mediastream/mac/WindowDisplayCapturerMac.mm   2021-05-09 18:54:10 UTC (rev 277249)
</span><span class="lines">@@ -104,16 +104,15 @@
</span><span class="cx"> 
</span><span class="cx"> Expected<UniqueRef<DisplayCaptureSourceCocoa::Capturer>, String> WindowDisplayCapturerMac::create(const String& deviceID)
</span><span class="cx"> {
</span><del>-    bool ok;
-    auto displayID = deviceID.toUIntStrict(&ok);
-    if (!ok)
</del><ins>+    auto displayID = parseInteger<uint32_t>(deviceID);
+    if (!displayID)
</ins><span class="cx">         return makeUnexpected("Invalid window device ID"_s);
</span><span class="cx"> 
</span><del>-    auto windowInfo = windowDescription(displayID);
</del><ins>+    auto windowInfo = windowDescription(*displayID);
</ins><span class="cx">     if (!windowInfo)
</span><span class="cx">         return makeUnexpected("Invalid window ID"_s);
</span><span class="cx"> 
</span><del>-    return UniqueRef<DisplayCaptureSourceCocoa::Capturer>(makeUniqueRef<WindowDisplayCapturerMac>(displayID));
</del><ins>+    return UniqueRef<DisplayCaptureSourceCocoa::Capturer>(makeUniqueRef<WindowDisplayCapturerMac>(*displayID));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> WindowDisplayCapturerMac::WindowDisplayCapturerMac(uint32_t windowID)
</span><span class="lines">@@ -137,9 +136,8 @@
</span><span class="cx"> 
</span><span class="cx"> Optional<CaptureDevice> WindowDisplayCapturerMac::windowCaptureDeviceWithPersistentID(const String& idString)
</span><span class="cx"> {
</span><del>-    bool ok;
-    auto windowID = idString.toUIntStrict(&ok);
-    if (!ok) {
</del><ins>+    auto windowID = parseInteger<uint32_t>(idString);
+    if (!windowID) {
</ins><span class="cx">         RELEASE_LOG(WebRTC, "WindowDisplayCapturerMac::windowCaptureDeviceWithPersistentID: window ID does not convert to 32-bit integer");
</span><span class="cx">         return WTF::nullopt;
</span><span class="cx">     }
</span><span class="lines">@@ -157,7 +155,7 @@
</span><span class="cx">         return WTF::nullopt;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    auto device = CaptureDevice(String::number(windowID), CaptureDevice::DeviceType::Window, windowTitle);
</del><ins>+    auto device = CaptureDevice(String::number(*windowID), CaptureDevice::DeviceType::Window, windowTitle);
</ins><span class="cx">     device.setEnabled(true);
</span><span class="cx"> 
</span><span class="cx">     return device;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkHTTPParserscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/HTTPParsers.cpp (277248 => 277249)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/HTTPParsers.cpp    2021-05-09 18:39:24 UTC (rev 277248)
+++ trunk/Source/WebCore/platform/network/HTTPParsers.cpp       2021-05-09 18:54:10 UTC (rev 277249)
</span><span class="lines">@@ -39,6 +39,7 @@
</span><span class="cx"> #include <wtf/DateMath.h>
</span><span class="cx"> #include <wtf/NeverDestroyed.h>
</span><span class="cx"> #include <wtf/Optional.h>
</span><ins>+#include <wtf/text/StringToIntegerConversion.h>
</ins><span class="cx"> #include <wtf/unicode/CharacterNames.h>
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -601,11 +602,8 @@
</span><span class="cx">     // Example:
</span><span class="cx">     //     -500
</span><span class="cx">     if (!index) {
</span><del>-        String suffixLengthString = byteRange.substring(index + 1).stripWhiteSpace();
-        bool ok;
-        long long value = suffixLengthString.toInt64Strict(&ok);
-        if (ok)
-            rangeSuffixLength = value;
</del><ins>+        if (auto value = parseInteger<long long>(StringView { byteRange }.substring(index + 1)))
+            rangeSuffixLength = *value;
</ins><span class="cx">         return true;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -613,24 +611,23 @@
</span><span class="cx">     // Examples:
</span><span class="cx">     //     0-499
</span><span class="cx">     //     500-
</span><del>-    String firstBytePosStr = byteRange.left(index).stripWhiteSpace();
-    bool ok;
-    long long firstBytePos = firstBytePosStr.toInt64Strict(&ok);
-    if (!ok)
</del><ins>+    auto firstBytePos = parseInteger<long long>(StringView { byteRange }.left(index));
+    if (!firstBytePos)
</ins><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    String lastBytePosStr = byteRange.substring(index + 1).stripWhiteSpace();
</del><ins>+    auto lastBytePosStr = stripLeadingAndTrailingHTTPSpaces(StringView { byteRange }.substring(index + 1));
</ins><span class="cx">     long long lastBytePos = -1;
</span><span class="cx">     if (!lastBytePosStr.isEmpty()) {
</span><del>-        lastBytePos = lastBytePosStr.toInt64Strict(&ok);
-        if (!ok)
</del><ins>+        auto value = parseInteger<long long>(lastBytePosStr);
+        if (!value)
</ins><span class="cx">             return false;
</span><ins>+        lastBytePos = *value;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (firstBytePos < 0 || !(lastBytePos == -1 || lastBytePos >= firstBytePos))
</del><ins>+    if (*firstBytePos < 0 || !(lastBytePos == -1 || lastBytePos >= *firstBytePos))
</ins><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    rangeOffset = firstBytePos;
</del><ins>+    rangeOffset = *firstBytePos;
</ins><span class="cx">     rangeEnd = lastBytePos;
</span><span class="cx">     return true;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkParsedContentRangecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/ParsedContentRange.cpp (277248 => 277249)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/ParsedContentRange.cpp     2021-05-09 18:39:24 UTC (rev 277248)
+++ trunk/Source/WebCore/platform/network/ParsedContentRange.cpp        2021-05-09 18:54:10 UTC (rev 277249)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx"> 
</span><span class="cx"> #include <wtf/StdLibExtras.h>
</span><span class="cx"> #include <wtf/text/StringConcatenateNumbers.h>
</span><ins>+#include <wtf/text/StringToIntegerConversion.h>
</ins><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="lines">@@ -83,7 +84,7 @@
</span><span class="cx">     if (!firstByteString.isAllSpecialCharacters<isASCIIDigit>())
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    auto optionalFirstBytePosition = firstByteString.toInt64Strict();
</del><ins>+    auto optionalFirstBytePosition = parseInteger<int64_t>(firstByteString);
</ins><span class="cx">     if (!optionalFirstBytePosition)
</span><span class="cx">         return false;
</span><span class="cx">     firstBytePosition = *optionalFirstBytePosition;
</span><span class="lines">@@ -92,7 +93,7 @@
</span><span class="cx">     if (!lastByteString.isAllSpecialCharacters<isASCIIDigit>())
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    auto optionalLastBytePosition = lastByteString.toInt64Strict();
</del><ins>+    auto optionalLastBytePosition = parseInteger<int64_t>(lastByteString);
</ins><span class="cx">     if (!optionalLastBytePosition)
</span><span class="cx">         return false;
</span><span class="cx">     lastBytePosition = *optionalLastBytePosition;
</span><span class="lines">@@ -104,7 +105,7 @@
</span><span class="cx">         if (!instanceString.isAllSpecialCharacters<isASCIIDigit>())
</span><span class="cx">             return false;
</span><span class="cx"> 
</span><del>-        auto optionalInstanceLength = instanceString.toInt64Strict();
</del><ins>+        auto optionalInstanceLength = parseInteger<int64_t>(instanceString);
</ins><span class="cx">         if (!optionalInstanceLength)
</span><span class="cx">             return false;
</span><span class="cx">         instanceLength = *optionalInstanceLength;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkParsedRequestRangecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/ParsedRequestRange.cpp (277248 => 277249)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/ParsedRequestRange.cpp     2021-05-09 18:39:24 UTC (rev 277248)
+++ trunk/Source/WebCore/platform/network/ParsedRequestRange.cpp        2021-05-09 18:54:10 UTC (rev 277249)
</span><span class="lines">@@ -44,13 +44,13 @@
</span><span class="cx">         return WTF::nullopt;
</span><span class="cx"> 
</span><span class="cx">     auto beginString = input.substring(rangeBeginPosition, dashPosition - rangeBeginPosition);
</span><del>-    auto optionalBegin = beginString.toUInt64Strict();
</del><ins>+    auto optionalBegin = parseInteger<uint64_t>(beginString);
</ins><span class="cx">     if (!optionalBegin)
</span><span class="cx">         return WTF::nullopt;
</span><span class="cx">     begin = *optionalBegin;
</span><span class="cx"> 
</span><span class="cx">     auto endString = input.substring(dashPosition + 1);
</span><del>-    auto optionalEnd = endString.toUInt64Strict();
</del><ins>+    auto optionalEnd = parseInteger<uint64_t>(endString);
</ins><span class="cx">     if (!optionalEnd)
</span><span class="cx">         return WTF::nullopt;
</span><span class="cx">     end = *optionalEnd;
</span></span></pre>
</div>
</div>

</body>
</html>