Bug 1305422 - part 14 - don't call size_forward in nsDefaultURIFixup.cpp; r=bkelly
authorNathan Froyd <froydnj@mozilla.com>
Thu, 29 Sep 2016 22:33:57 -0400
changeset 315885 e8f15fc02cfc3389a47cf5b2ab19bd42aac829f3
parent 315884 b26623101a0d921ea19d27e85c5262aab1313d8e
child 315886 daf738c4a41117ef270fc56dd1ec10121b596802
push id20634
push usercbook@mozilla.com
push dateFri, 30 Sep 2016 10:10:13 +0000
treeherderfx-team@afe79b010d13 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbkelly
bugs1305422
milestone52.0a1
Bug 1305422 - part 14 - don't call size_forward in nsDefaultURIFixup.cpp; r=bkelly
docshell/base/nsDefaultURIFixup.cpp
--- a/docshell/base/nsDefaultURIFixup.cpp
+++ b/docshell/base/nsDefaultURIFixup.cpp
@@ -907,17 +907,17 @@ nsDefaultURIFixup::KeywordURIFixup(const
              (*iter >= 'A' && *iter <= 'F') ||
              nsCRT::IsAsciiDigit(*iter)))) {
         looksLikeIpv6 = false;
       }
     }
 
     // If we're at the end of the string or this is the first slash,
     // check if the thing before the slash looks like ipv4:
-    if ((iter.size_forward() == 1 ||
+    if ((iterEnd - iter == 1 ||
          (lastSlashLoc == uint32_t(kNotFound) && *iter == '/')) &&
         // Need 2 or 3 dots + only digits
         (foundDots == 2 || foundDots == 3) &&
         // and they should be all that came before now:
         (foundDots + foundDigits == pos ||
          // or maybe there was also exactly 1 colon that came after the last dot,
          // and the digits, dots and colon were all that came before now:
          (foundColons == 1 && firstColonLoc > lastDotLoc &&