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

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

Issue 20300002: Fix trailing whitespace in .cpp, .h, and .idl files (ex. Source/core) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/wtf/RefCountedLeakCounter.h ('k') | Source/wtf/RefPtr.h » ('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 (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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 void RefCountedLeakCounter::cancelMessageSuppression(const char* reason) 54 void RefCountedLeakCounter::cancelMessageSuppression(const char* reason)
55 { 55 {
56 ASSERT(leakMessageSuppressionReasons); 56 ASSERT(leakMessageSuppressionReasons);
57 ASSERT(leakMessageSuppressionReasons->contains(reason)); 57 ASSERT(leakMessageSuppressionReasons->contains(reason));
58 leakMessageSuppressionReasons->remove(reason); 58 leakMessageSuppressionReasons->remove(reason);
59 } 59 }
60 60
61 RefCountedLeakCounter::RefCountedLeakCounter(const char* description) 61 RefCountedLeakCounter::RefCountedLeakCounter(const char* description)
62 : m_description(description) 62 : m_description(description)
63 { 63 {
64 } 64 }
65 65
66 RefCountedLeakCounter::~RefCountedLeakCounter() 66 RefCountedLeakCounter::~RefCountedLeakCounter()
67 { 67 {
68 static bool loggedSuppressionReason; 68 static bool loggedSuppressionReason;
69 if (m_count) { 69 if (m_count) {
70 if (!leakMessageSuppressionReasons || leakMessageSuppressionReasons->isE mpty()) 70 if (!leakMessageSuppressionReasons || leakMessageSuppressionReasons->isE mpty())
71 LOG(RefCountedLeaks, "LEAK: %u %s", m_count, m_description); 71 LOG(RefCountedLeaks, "LEAK: %u %s", m_count, m_description);
72 else if (!loggedSuppressionReason) { 72 else if (!loggedSuppressionReason) {
73 // This logs only one reason. Later we could change it so we log all the reasons. 73 // This logs only one reason. Later we could change it so we log all the reasons.
74 LOG(RefCountedLeaks, "No leak checking done: %s", leakMessageSuppres sionReasons->begin()->key); 74 LOG(RefCountedLeaks, "No leak checking done: %s", leakMessageSuppres sionReasons->begin()->key);
75 loggedSuppressionReason = true; 75 loggedSuppressionReason = true;
76 } 76 }
77 } 77 }
78 } 78 }
79 79
80 void RefCountedLeakCounter::increment() 80 void RefCountedLeakCounter::increment()
81 { 81 {
82 atomicIncrement(&m_count); 82 atomicIncrement(&m_count);
83 } 83 }
84 84
85 void RefCountedLeakCounter::decrement() 85 void RefCountedLeakCounter::decrement()
86 { 86 {
87 atomicDecrement(&m_count); 87 atomicDecrement(&m_count);
88 } 88 }
89 89
90 #endif 90 #endif
91 91
92 } // namespace WTF 92 } // namespace WTF
OLDNEW
« no previous file with comments | « Source/wtf/RefCountedLeakCounter.h ('k') | Source/wtf/RefPtr.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698