From 8f9cd3e3f55392e81a3204ce0c92cafb06ca64f2 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Fri, 15 Jul 2016 23:40:19 -0400 Subject: [PATCH] Bug 1224664 followup: NS_ASSERT_OWNINGTHREAD needs to be #ifdef DEBUG if our NS_DECL_OWNINGTHREAD is. --- dom/bindings/ErrorResult.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dom/bindings/ErrorResult.h b/dom/bindings/ErrorResult.h index 37c99b9055f2..8b71743fc05e 100644 --- a/dom/bindings/ErrorResult.h +++ b/dom/bindings/ErrorResult.h @@ -119,7 +119,7 @@ public: } ~TErrorResult() { - NS_ASSERT_OWNINGTHREAD(TErrorResult); + AssertInOwningThread(); if (CleanupPolicy::assertHandled) { // Consumers should have called one of MaybeSetPendingException @@ -366,8 +366,10 @@ private: #endif // DEBUG } - void AssertInOwningThread() const { + MOZ_ALWAYS_INLINE void AssertInOwningThread() const { +#ifdef DEBUG NS_ASSERT_OWNINGTHREAD(TErrorResult); +#endif } void AssignErrorCode(nsresult aRv) {