Revert "Explicitly wrap main thread in test_main.cc."
This reverts commit 711a31aead9007e42dd73c302c8ec40f9e931619.
Reason for revert: Speculative revert
Original change's description:
> Explicitly wrap main thread in test_main.cc.
>
> Bug: webrtc:9714
> Change-Id: I6ee234f9a0b88b3656a683f2455c3e4b2acf0d54
> Reviewed-on: https://webrtc-review.googlesource.com/97683
> Reviewed-by: Tommi <tommi@webrtc.org>
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#24560}
TBR=mbonadei@webrtc.org,kwiberg@webrtc.org,nisse@webrtc.org,tommi@webrtc.org
Change-Id: I4c50ced1b63d9d5d20770e7a121c34c1e3da344c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9714
Reviewed-on: https://webrtc-review.googlesource.com/98020
Reviewed-by: Ying Wang <yinwa@webrtc.org>
Commit-Queue: Ying Wang <yinwa@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24572}
diff --git a/rtc_base/messagequeue.cc b/rtc_base/messagequeue.cc
index 93e6b1e..035ff07 100644
--- a/rtc_base/messagequeue.cc
+++ b/rtc_base/messagequeue.cc
@@ -163,15 +163,11 @@
new ScopedIncrement(&queues_not_done));
}
}
-
- rtc::Thread* current = rtc::Thread::Current();
- if (current) {
- // Note: One of the message queues may have been on this thread, which is
- // why we can't synchronously wait for queues_not_done to go to 0; we need
- // to process messages as well.
- while (AtomicOps::AcquireLoad(&queues_not_done) > 0) {
- current->ProcessMessages(0);
- }
+ // Note: One of the message queues may have been on this thread, which is why
+ // we can't synchronously wait for queues_not_done to go to 0; we need to
+ // process messages as well.
+ while (AtomicOps::AcquireLoad(&queues_not_done) > 0) {
+ rtc::Thread::Current()->ProcessMessages(0);
}
}