Backed out changeset 2c368e6b267e (bug 1139554) for mochitest-2 failures
authorWes Kocher <wkocher@mozilla.com>
Thu, 26 Mar 2015 17:34:37 -0700
changeset 264912 e99d72e0a529bd7b95e56fe39cad2e42ee1d1445
parent 264911 8833d0060bcaf000083cabea394c8a967168ffce
child 264913 9ea27ee1d96d779ceffb8cecbfb3a924b83b5546
push id4718
push userraliiev@mozilla.com
push dateMon, 11 May 2015 18:39:53 +0000
treeherdermozilla-beta@c20c4ef55f08 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1139554
milestone39.0a1
backs out2c368e6b267e29f2d178da85f4fbaf38d0efb34a
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
Backed out changeset 2c368e6b267e (bug 1139554) for mochitest-2 failures
dom/base/ResponsiveImageSelector.cpp
--- a/dom/base/ResponsiveImageSelector.cpp
+++ b/dom/base/ResponsiveImageSelector.cpp
@@ -98,28 +98,30 @@ ResponsiveImageSelector::SetCandidatesFr
       break;
     }
 
     url = iter;
 
     // Find end of url
     for (;iter != end && !nsContentUtils::IsHTMLWhitespace(*iter); ++iter);
 
+    urlEnd = iter;
+
     // Omit trailing commas from URL.
     // Multiple commas are a non-fatal error.
-    while (iter != url) {
-      if (*(--iter) != char16_t(',')) {
-        iter++;
+    while (urlEnd != url) {
+      if (*(--urlEnd) != char16_t(',')) {
+        urlEnd++;
         break;
       }
     }
 
-    const nsDependentSubstring &urlStr = Substring(url, iter);
+    const nsDependentSubstring &urlStr = Substring(url, urlEnd);
 
-    MOZ_ASSERT(url != iter, "Shouldn't have empty URL at this point");
+    MOZ_ASSERT(url != urlEnd, "Shouldn't have empty URL at this point");
 
     ResponsiveImageCandidate candidate;
     if (candidate.ConsumeDescriptors(iter, end)) {
       candidate.SetURLSpec(urlStr);
       AppendCandidateIfUnique(candidate);
     }
   }