diff --git a/js/src/gc/Marking.cpp b/js/src/gc/Marking.cpp index c822d58de9c3..c41420471720 100644 --- a/js/src/gc/Marking.cpp +++ b/js/src/gc/Marking.cpp @@ -2229,13 +2229,17 @@ MarkStackIter::MarkStackIter(const MarkStack& stack) : stack_(stack), pos_(stack.tos_) { +#ifdef DEBUG stack.iteratorCount_++; +#endif } MarkStackIter::~MarkStackIter() { +#ifdef DEBUG MOZ_ASSERT(stack_.iteratorCount_); stack_.iteratorCount_--; +#endif } inline size_t