Bug 1305422 - part 13 - don't call size_forward in nsXMLContentSerializer.cpp; r=baku
authorNathan Froyd <froydnj@mozilla.com>
Thu, 29 Sep 2016 22:33:57 -0400
changeset 315884 b26623101a0d921ea19d27e85c5262aab1313d8e
parent 315883 17a8607397e55ea4ea383beddc8969e0f5b78511
child 315885 e8f15fc02cfc3389a47cf5b2ab19bd42aac829f3
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)
reviewersbaku
bugs1305422
milestone52.0a1
Bug 1305422 - part 13 - don't call size_forward in nsXMLContentSerializer.cpp; r=baku
dom/base/nsXMLContentSerializer.cpp
--- a/dom/base/nsXMLContentSerializer.cpp
+++ b/dom/base/nsXMLContentSerializer.cpp
@@ -1239,17 +1239,17 @@ nsXMLContentSerializer::AppendAndTransla
   uint32_t advanceLength = 0;
   nsReadingIterator<char16_t> iter;
 
   const uint8_t* entityTable = mInAttribute ? kAttrEntities : kEntities;
 
   for (aStr.BeginReading(iter);
        iter != done_reading;
        iter.advance(int32_t(advanceLength))) {
-    uint32_t fragmentLength = iter.size_forward();
+    uint32_t fragmentLength = done_reading - iter;
     const char16_t* c = iter.get();
     const char16_t* fragmentStart = c;
     const char16_t* fragmentEnd = c + fragmentLength;
     const char* entityText = nullptr;
 
     advanceLength = 0;
     // for each character in this chunk, check if it
     // needs to be replaced