Bug 1172055 - Fix non-unified bustage. a=me
authorRyan VanderMeulen <ryanvm@gmail.com>
Tue, 01 Sep 2015 09:42:26 -0400
changeset 238798 c03e2bc6a3a463b3bad84739f5ed30d8c18a7cfa
parent 238797 b0a16998b5b0fe2ac348a2829984e3e34bdaacc6
child 238799 c1ed0cd007f2ad022aa0268ae129bda938d36f8f
push id791
push userryanvm@gmail.com
push dateTue, 01 Sep 2015 16:28:10 +0000
treeherdermozilla-b2g37_v2_2@c03e2bc6a3a4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
bugs1172055
milestone37.0
Bug 1172055 - Fix non-unified bustage. a=me
dom/base/nsAttrAndChildArray.cpp
--- a/dom/base/nsAttrAndChildArray.cpp
+++ b/dom/base/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