Bug 1224664 followup: NS_ASSERT_OWNINGTHREAD needs to be #ifdef DEBUG if our NS_DECL_OWNINGTHREAD is.

This commit is contained in:
Boris Zbarsky 2016-07-15 23:40:19 -04:00
Родитель a522fa79b7
Коммит 8f9cd3e3f5
1 изменённых файлов: 4 добавлений и 2 удалений

Просмотреть файл

@ -119,7 +119,7 @@ public:
} }
~TErrorResult() { ~TErrorResult() {
NS_ASSERT_OWNINGTHREAD(TErrorResult); AssertInOwningThread();
if (CleanupPolicy::assertHandled) { if (CleanupPolicy::assertHandled) {
// Consumers should have called one of MaybeSetPendingException // Consumers should have called one of MaybeSetPendingException
@ -366,8 +366,10 @@ private:
#endif // DEBUG #endif // DEBUG
} }
void AssertInOwningThread() const { MOZ_ALWAYS_INLINE void AssertInOwningThread() const {
#ifdef DEBUG
NS_ASSERT_OWNINGTHREAD(TErrorResult); NS_ASSERT_OWNINGTHREAD(TErrorResult);
#endif
} }
void AssignErrorCode(nsresult aRv) { void AssignErrorCode(nsresult aRv) {