Bug 1172055 - Fix non-unified bustage. a=me
authorRyan VanderMeulen <ryanvm@gmail.com>
Tue, 01 Sep 2015 09:42:26 -0400
changeset 260722 e50a237d38b64dfbb084ab309845c0b8b93841c2
parent 260721 555c7d4a6575671a8f3fac45fbd08d82ae0c3349
child 260723 947b193e588ab9296572aa8759530ebde728c1f1
push id149
push userryanvm@gmail.com
push dateThu, 03 Sep 2015 17:17:45 +0000
treeherdermozilla-esr38@a76d4a1c7fcc [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
@@ -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