Bug 1172055 - Fix non-unified bustage. a=me
authorRyan VanderMeulen <ryanvm@gmail.com>
Tue, 01 Sep 2015 09:42:26 -0400
changeset 282117 bacde2f7a48b7e09d2c6ba4bdd37c13280645ea7
parent 282116 02d6ac9a671e38575e0cc751d5fcb81ddcd309dd
child 282118 ab7141ea1f7c947a5335e43d7e81b8c4e5771980
push id5015
push userryanvm@gmail.com
push dateTue, 01 Sep 2015 18:12:31 +0000
treeherdermozilla-beta@5eb7db7d4c38 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
Bug 1172055 - Fix non-unified bustage. a=me
--- a/dom/base/nsAttrAndChildArray.cpp
+++ b/dom/base/nsAttrAndChildArray.cpp
@@ -6,28 +6,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