Bug 1305422 - part 4 - don't call size_forward in nsIDNService.cpp; r=erahm

We don't need to bother with iterators here at all; we can just ask the
string for its data and length directly.
This commit is contained in:
Nathan Froyd 2016-09-29 22:33:58 -04:00
parent 17702bc8dd
commit 92e64e1b8c

View File

@ -326,11 +326,8 @@ nsresult nsIDNService::ACEtoUTF8(const nsACString & input, nsACString & _retval,
NS_IMETHODIMP nsIDNService::IsACE(const nsACString & input, bool *_retval)
{
nsACString::const_iterator begin;
input.BeginReading(begin);
const char *data = begin.get();
uint32_t dataLen = begin.size_forward();
const char *data = input.BeginReading();
uint32_t dataLen = input.Length();
// look for the ACE prefix in the input string. it may occur
// at the beginning of any segment in the domain name. for