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

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

Issue 1537923003: Fix pointer compare-and-swap on Windows. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: fix argument order Created 5 years 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/criticalsection_unittest.cc ('k') | no next file » | 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 (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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 #include "webrtc/base/event_tracer.h" 10 #include "webrtc/base/event_tracer.h"
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 g_event_logger->Start(file, true); 250 g_event_logger->Start(file, true);
251 return true; 251 return true;
252 } 252 }
253 253
254 void StopInternalCapture() { 254 void StopInternalCapture() {
255 g_event_logger->Stop(); 255 g_event_logger->Stop();
256 } 256 }
257 257
258 void ShutdownInternalTracer() { 258 void ShutdownInternalTracer() {
259 StopInternalCapture(); 259 StopInternalCapture();
260 EventLogger* old_logger = rtc::AtomicOps::AtomicLoadPtr(&g_event_logger); 260 EventLogger* old_logger = rtc::AtomicOps::AcquireLoadPtr(&g_event_logger);
261 RTC_DCHECK(old_logger); 261 RTC_DCHECK(old_logger);
262 RTC_CHECK(rtc::AtomicOps::CompareAndSwapPtr( 262 RTC_CHECK(rtc::AtomicOps::CompareAndSwapPtr(
263 &g_event_logger, old_logger, 263 &g_event_logger, old_logger,
264 static_cast<EventLogger*>(nullptr)) == old_logger); 264 static_cast<EventLogger*>(nullptr)) == old_logger);
265 delete old_logger; 265 delete old_logger;
266 webrtc::SetupEventTracer(nullptr, nullptr); 266 webrtc::SetupEventTracer(nullptr, nullptr);
267 } 267 }
268 268
269 } // namespace tracing 269 } // namespace tracing
270 } // namespace rtc 270 } // namespace rtc
OLDNEW
« no previous file with comments | « webrtc/base/criticalsection_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698