diff --git a/xpcom/threads/nsEventQueue.cpp b/xpcom/threads/nsEventQueue.cpp index be48637425b..8e3194f3d08 100644 --- a/xpcom/threads/nsEventQueue.cpp +++ b/xpcom/threads/nsEventQueue.cpp @@ -191,7 +191,10 @@ NS_IMETHODIMP nsEventQueueImpl::ProcessPendingEvents() { PRBool correctThread = PL_IsQueueOnCurrentThread(mEventQueue); +#ifdef DEBUG_dougt NS_ASSERTION(correctThread, "attemping to process events on the wrong thread"); +#endif + if (!correctThread) return NS_ERROR_FAILURE; PL_ProcessPendingEvents(mEventQueue); @@ -203,7 +206,9 @@ NS_IMETHODIMP nsEventQueueImpl::EventLoop() { PRBool correctThread = PL_IsQueueOnCurrentThread(mEventQueue); +#ifdef DEBUG_dougt NS_ASSERTION(correctThread, "attemping to process events on the wrong thread"); +#endif if (!correctThread) return NS_ERROR_FAILURE; @@ -230,7 +235,9 @@ NS_IMETHODIMP nsEventQueueImpl::HandleEvent(PLEvent* aEvent) { PRBool correctThread = PL_IsQueueOnCurrentThread(mEventQueue); +#ifdef DEBUG_dougt NS_ASSERTION(correctThread, "attemping to process events on the wrong thread"); +#endif if (!correctThread) return NS_ERROR_FAILURE; @@ -242,7 +249,9 @@ NS_IMETHODIMP nsEventQueueImpl::WaitForEvent(PLEvent** aResult) { PRBool correctThread = PL_IsQueueOnCurrentThread(mEventQueue); +#ifdef DEBUG_dougt NS_ASSERTION(correctThread, "attemping to process events on the wrong thread"); +#endif if (!correctThread) return NS_ERROR_FAILURE;