Bug 1172055 - Fix non-unified bustage. a=me
authorRyan VanderMeulen <ryanvm@gmail.com>
Tue, 01 Sep 2015 09:42:26 -0400
changeset 222384 d058b8819614f1d0316d9ffd310397bae0c139d3
parent 222383 79cb3e2bbc3ff397249c2eedda01582e710afe37
child 222385 9d414eb53b238f6e7a2903b8fd0a91c818cca893
push id243
push userryanvm@gmail.com
push dateTue, 01 Sep 2015 15:21:07 +0000
treeherdermozilla-b2g34_v2_1s@d058b8819614 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
Bug 1172055 - Fix non-unified bustage. a=me
--- a/content/base/src/nsAttrAndChildArray.cpp
+++ b/content/base/src/nsAttrAndChildArray.cpp
@@ -5,28 +5,31 @@
  * Storage of the children and attributes of a DOM node; storage for
  * the two is unified to minimize footprint.
 #include "nsAttrAndChildArray.h"
+#include "mozilla/CheckedInt.h"
 #include "mozilla/MathAlgorithms.h"
 #include "mozilla/MemoryReporting.h"
 #include "nsMappedAttributeElement.h"
 #include "nsString.h"
 #include "nsHTMLStyleSheet.h"
 #include "nsRuleWalker.h"
 #include "nsMappedAttributes.h"
 #include "nsUnicharUtils.h"
 #include "nsAutoPtr.h"
 #include "nsContentUtils.h" // nsAutoScriptBlocker
+using mozilla::CheckedUint32;
 CACHE_POINTER_SHIFT indicates how many steps to downshift the |this| pointer.
 It should be small enough to not cause collisions between adjecent arrays, and
 large enough to make sure that all indexes are used. The size below is based
 on the size of the smallest possible element (currently 24[*] bytes) which is
 the smallest distance between two nsAttrAndChildArray. 24/(2^_5_) is 0.75.
 This means that two adjacent nsAttrAndChildArrays will overlap one in 4 times.
 However not all elements will have enough children to get cached. And any
@@ -72,17 +75,17 @@ GetIndexFromCache(const nsAttrAndChildAr
   uint32_t ix = CACHE_GET_INDEX(aArray);
   return indexCache[ix].array == aArray ? indexCache[ix].index : -1;
  * Due to a compiler bug in VisualAge C++ for AIX, we need to return the 
- * address of the first index into mBuffer here, instead of simply returning 
+ * address of the first index into mBusing mozilla::CheckedUint32;uffer here, instead of simply returning 
  * mBuffer itself.
  * See Bug 231104 for more information.
 #define ATTRS(_impl) \