Bug 1365954 - Fix check for EXTRA_DOM_ELEMENT_BYTES. r=bholley
MozReview-Commit-ID: CNG7XR4ZjIi
--- 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 \
{ \