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

Unified Diff: base/thread_collision_warner_unittest.cc

Issue 19018: Fix a memory leak in release with ThreadCollisionWarner unit tests. Less than... (Closed) Base URL: svn://chrome-svn.corp.google.com/chrome/trunk/src/
Patch Set: Created 11 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/thread_collision_warner_unittest.cc
===================================================================
--- base/thread_collision_warner_unittest.cc (revision 8719)
+++ base/thread_collision_warner_unittest.cc (working copy)
@@ -114,9 +114,12 @@
public:
explicit NonThreadSafeQueue(base::AsserterBase* asserter)
#if !defined(NDEBUG)
- : push_pop_(asserter)
+ : push_pop_(asserter) {
+#else
+ {
+ delete asserter;
#endif
- { }
+ }
void push(int value) {
DFAKE_SCOPED_LOCK_THREAD_LOCKED(push_pop_);
@@ -177,9 +180,12 @@
public:
explicit NonThreadSafeQueue(base::AsserterBase* asserter)
#if !defined(NDEBUG)
- : push_pop_(asserter)
+ : push_pop_(asserter) {
+#else
+ {
+ delete asserter;
#endif
- { }
+ }
void push(int value) {
DFAKE_SCOPED_LOCK(push_pop_);
@@ -241,9 +247,12 @@
public:
explicit NonThreadSafeQueue(base::AsserterBase* asserter)
#if !defined(NDEBUG)
- : push_pop_(asserter)
+ : push_pop_(asserter) {
+#else
+ {
+ delete asserter;
#endif
- { }
+ }
void push(int value) {
DFAKE_SCOPED_LOCK(push_pop_);
@@ -312,9 +321,12 @@
public:
explicit NonThreadSafeQueue(base::AsserterBase* asserter)
#if !defined(NDEBUG)
- : push_pop_(asserter)
+ : push_pop_(asserter) {
+#else
+ {
+ delete asserter;
#endif
- { }
+ }
void push(int) {
DFAKE_SCOPED_RECURSIVE_LOCK(push_pop_);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698