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 315876 b26623101a0d921ea19d27e85c5262aab1313d8e
parent 315875 17a8607397e55ea4ea383beddc8969e0f5b78511
child 315877 e8f15fc02cfc3389a47cf5b2ab19bd42aac829f3
push id30757
push usercbook@mozilla.com
push dateFri, 30 Sep 2016 10:02:43 +0000
treeherdermozilla-central@5ffed033557e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbaku
bugs1305422
milestone52.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 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