Bug 1170274 - patch 2 - A better string parser for nsGenericHTMLElement::GetURIListAttr, r=ehsan CLOSED TREE
authorAndrea Marchesini <amarchesini@mozilla.com>
Wed, 17 Jun 2015 17:00:37 +0100
changeset 249318 b55daa813afdbb540fc45fefc387f358085477e8
parent 249317 545afafa3df47596d17b0cbcf25e708f79df3f14
child 249370 099d6cd6725e6973421edb9f8fb04d8ddd93bbc5
push id61227
push useramarchesini@mozilla.com
push dateWed, 17 Jun 2015 16:01:20 +0000
treeherdermozilla-inbound@b55daa813afd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersehsan
bugs1170274
milestone41.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1170274 - patch 2 - A better string parser for nsGenericHTMLElement::GetURIListAttr, r=ehsan CLOSED TREE
dom/html/nsGenericHTMLElement.cpp
--- a/dom/html/nsGenericHTMLElement.cpp
+++ b/dom/html/nsGenericHTMLElement.cpp
@@ -1734,27 +1734,27 @@ nsGenericHTMLElement::GetURIListAttr(nsI
 
   nsString::const_iterator end;
   value.EndReading(end);
 
   nsAString::const_iterator iter;
   value.BeginReading(iter);
 
   while (iter != end) {
-    while (nsCRT::IsAsciiSpace(*iter) && iter != end) {
+    while (*iter == ' ' && iter != end) {
       ++iter;
     }
 
     if (iter == end) {
       break;
     }
 
     nsAString::const_iterator start = iter;
 
-    while (iter != end && !nsCRT::IsAsciiSpace(*iter)) {
+    while (iter != end && *iter != ' ') {
       ++iter;
     }
 
     if (!aResult.IsEmpty()) {
       aResult.Append(NS_LITERAL_STRING(" "));
     }
 
     const nsSubstring& uriPart = Substring(start, iter);