Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(294)

Side by Side Diff: webrtc/base/criticalsection_unittest.cc

Issue 2019423006: Adding more detail to MessageQueue::Dispatch logging. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fixing one more place where RTC_FROM_HERE wasn't used. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/base/bind.h.pump ('k') | webrtc/base/dbus.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2014 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2014 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 197
198 struct CompareAndSwapOp { 198 struct CompareAndSwapOp {
199 static int AtomicOp(int* i) { return AtomicOps::CompareAndSwap(i, 0, 1); } 199 static int AtomicOp(int* i) { return AtomicOps::CompareAndSwap(i, 0, 1); }
200 }; 200 };
201 201
202 void StartThreads(ScopedPtrCollection<Thread>* threads, 202 void StartThreads(ScopedPtrCollection<Thread>* threads,
203 MessageHandler* handler) { 203 MessageHandler* handler) {
204 for (int i = 0; i < kNumThreads; ++i) { 204 for (int i = 0; i < kNumThreads; ++i) {
205 Thread* thread = new Thread(); 205 Thread* thread = new Thread();
206 thread->Start(); 206 thread->Start();
207 thread->Post(handler); 207 thread->Post(RTC_FROM_HERE, handler);
208 threads->PushBack(thread); 208 threads->PushBack(thread);
209 } 209 }
210 } 210 }
211 211
212 } // namespace 212 } // namespace
213 213
214 TEST(AtomicOpsTest, Simple) { 214 TEST(AtomicOpsTest, Simple) {
215 int value = 0; 215 int value = 0;
216 EXPECT_EQ(1, AtomicOps::Increment(&value)); 216 EXPECT_EQ(1, AtomicOps::Increment(&value));
217 EXPECT_EQ(1, value); 217 EXPECT_EQ(1, value);
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 for (auto& t : threads) 422 for (auto& t : threads)
423 t.Start(&test_data, kThreadRepeats, 1); 423 t.Start(&test_data, kThreadRepeats, 1);
424 424
425 event.Wait(Event::kForever); 425 event.Wait(Event::kForever);
426 426
427 for (auto& t : threads) 427 for (auto& t : threads)
428 t.Stop(); 428 t.Stop();
429 } 429 }
430 430
431 } // namespace rtc 431 } // namespace rtc
OLDNEW
« no previous file with comments | « webrtc/base/bind.h.pump ('k') | webrtc/base/dbus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698