Disable CS_TRACK_OWNER on Mac in debug mode.
Local testing indicates that the pthread_t member variable might be causing alignment problems on the Chromium bots.  After landing this (and once the Chromium tree is open again), I'll try a roll again to see if this has an effect.

R=magjed@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/48449004

Cr-Commit-Position: refs/heads/master@{#8644}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8644 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/webrtc/base/criticalsection.h b/webrtc/base/criticalsection.h
index 3a1f6a4..c78e818 100644
--- a/webrtc/base/criticalsection.h
+++ b/webrtc/base/criticalsection.h
@@ -44,7 +44,13 @@
 #endif
 
 #ifdef _DEBUG
+#if defined(WEBRTC_MAC)
+// TODO(tommi): This is related to the comment above. It looks like the
+// pthread_t member might be throwing off the mac debug bots (10.9).
+#define CS_TRACK_OWNER 0
+#else
 #define CS_TRACK_OWNER 1
+#endif
 #endif  // _DEBUG
 
 #if CS_TRACK_OWNER
diff --git a/webrtc/base/messagequeue.cc b/webrtc/base/messagequeue.cc
index 74b1024..3706898 100644
--- a/webrtc/base/messagequeue.cc
+++ b/webrtc/base/messagequeue.cc
@@ -59,7 +59,9 @@
   // MessageQueueManager methods should be non-reentrant, so we
   // ASSERT that is the case.  If any of these ASSERT, please
   // contact bpm or jbeda.
+#if CS_TRACK_OWNER  // CurrentThreadIsOwner returns true by default.
   ASSERT(!crit_.CurrentThreadIsOwner());
+#endif
   CritScope cs(&crit_);
   message_queues_.push_back(message_queue);
 }
@@ -71,7 +73,9 @@
   return Instance()->RemoveInternal(message_queue);
 }
 void MessageQueueManager::RemoveInternal(MessageQueue *message_queue) {
+#if CS_TRACK_OWNER  // CurrentThreadIsOwner returns true by default.
   ASSERT(!crit_.CurrentThreadIsOwner());  // See note above.
+#endif
   // If this is the last MessageQueue, destroy the manager as well so that
   // we don't leak this object at program shutdown. As mentioned above, this is
   // not thread-safe, but this should only happen at program termination (when
@@ -100,7 +104,9 @@
   return Instance()->ClearInternal(handler);
 }
 void MessageQueueManager::ClearInternal(MessageHandler *handler) {
+#if CS_TRACK_OWNER  // CurrentThreadIsOwner returns true by default.
   ASSERT(!crit_.CurrentThreadIsOwner());  // See note above.
+#endif
   CritScope cs(&crit_);
   std::vector<MessageQueue *>::iterator iter;
   for (iter = message_queues_.begin(); iter != message_queues_.end(); iter++)