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

Side by Side Diff: third_party/WebKit/Source/wtf/RefCountedLeakCounter.cpp

Issue 1436153002: Apply clang-format with Chromium-style without column limit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2008 Apple Inc. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 12 matching lines...) Expand all
23 #include "wtf/Assertions.h" 23 #include "wtf/Assertions.h"
24 24
25 #if ENABLE(ASSERT) 25 #if ENABLE(ASSERT)
26 #include "wtf/Atomics.h" 26 #include "wtf/Atomics.h"
27 #endif 27 #endif
28 28
29 namespace WTF { 29 namespace WTF {
30 30
31 #if !ENABLE(ASSERT) 31 #if !ENABLE(ASSERT)
32 32
33 RefCountedLeakCounter::RefCountedLeakCounter(const char*) { } 33 RefCountedLeakCounter::RefCountedLeakCounter(const char*) {}
34 RefCountedLeakCounter::~RefCountedLeakCounter() { } 34 RefCountedLeakCounter::~RefCountedLeakCounter() {}
35 35
36 void RefCountedLeakCounter::increment() { } 36 void RefCountedLeakCounter::increment() {}
37 void RefCountedLeakCounter::decrement() { } 37 void RefCountedLeakCounter::decrement() {}
38 38
39 #else 39 #else
40 40
41 #define LOG_CHANNEL_PREFIX Log 41 #define LOG_CHANNEL_PREFIX Log
42 static WTFLogChannel LogRefCountedLeaks = { WTFLogChannelOn }; 42 static WTFLogChannel LogRefCountedLeaks = {WTFLogChannelOn};
43 43
44 RefCountedLeakCounter::RefCountedLeakCounter(const char* description) 44 RefCountedLeakCounter::RefCountedLeakCounter(const char* description)
45 : m_description(description) 45 : m_description(description) {
46 {
47 } 46 }
48 47
49 RefCountedLeakCounter::~RefCountedLeakCounter() 48 RefCountedLeakCounter::~RefCountedLeakCounter() {
50 { 49 if (!m_count)
51 if (!m_count) 50 return;
52 return;
53 51
54 WTF_LOG(RefCountedLeaks, "LEAK: %u %s", m_count, m_description); 52 WTF_LOG(RefCountedLeaks, "LEAK: %u %s", m_count, m_description);
55 } 53 }
56 54
57 void RefCountedLeakCounter::increment() 55 void RefCountedLeakCounter::increment() {
58 { 56 atomicIncrement(&m_count);
59 atomicIncrement(&m_count);
60 } 57 }
61 58
62 void RefCountedLeakCounter::decrement() 59 void RefCountedLeakCounter::decrement() {
63 { 60 atomicDecrement(&m_count);
64 atomicDecrement(&m_count);
65 } 61 }
66 62
67 #endif 63 #endif
68 64
69 } // namespace WTF 65 } // namespace WTF
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/wtf/RefCountedLeakCounter.h ('k') | third_party/WebKit/Source/wtf/RefPtr.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698