Bug 1365954 - Fix check for EXTRA_DOM_ELEMENT_BYTES. r=bholley draft
authorChristian Holler <choller@mozilla.com>
Thu, 18 May 2017 17:03:39 +0200
changeset 581327 23276dc9a6952294a98c87ab09de6caf35a9c9c3
parent 580449 031089f91a7c827aaf579a11db52a995153df7fd
child 629534 9fa2008d410ace2031a66a8f04fd5183c3a2467c
push id59823
push usercholler@mozilla.com
push dateFri, 19 May 2017 16:13:47 +0000
reviewersbholley
bugs1365954
milestone55.0a1
Bug 1365954 - Fix check for EXTRA_DOM_ELEMENT_BYTES. r=bholley MozReview-Commit-ID: CNG7XR4ZjIi
dom/base/Element.cpp
--- a/dom/base/Element.cpp
+++ b/dom/base/Element.cpp
@@ -159,19 +159,20 @@ using namespace mozilla::dom;
 
 //
 // Verify sizes of elements on 64-bit platforms. This should catch most memory
 // regressions, and is easy to verify locally since most developers are on
 // 64-bit machines. We use a template rather than a direct static assert so
 // that the error message actually displays the sizes.
 //
 
-// We need different numbers on debug and opt to deal with the owning thread
-// pointer that comes with the non-threadsafe refcount on FragmentOrElement.
-#if defined(DEBUG) || defined(MOZ_ASAN)
+// We need different numbers on certain build types to deal with the owning
+// thread pointer that comes with the non-threadsafe refcount on
+// FragmentOrElement.
+#ifdef MOZ_THREAD_SAFETY_OWNERSHIP_CHECKS_SUPPORTED
 #define EXTRA_DOM_ELEMENT_BYTES 8
 #else
 #define EXTRA_DOM_ELEMENT_BYTES 0
 #endif
 
 #define ASSERT_ELEMENT_SIZE(type, opt_size) \
 template<int a, int b> struct Check##type##Size \
 { \