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

Unified Diff: cc/occlusion_tracker_unittest.cc

Issue 11458003: Remove scoped_refptr::release which is confusing and causes leaks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: duh Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/memory/ref_counted.h ('k') | chrome/browser/extensions/api/downloads/downloads_api_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/occlusion_tracker_unittest.cc
diff --git a/cc/occlusion_tracker_unittest.cc b/cc/occlusion_tracker_unittest.cc
index d87b82c1e164650840015c945762f834e97c0567..a73772c16be3955c6ac9aedc899ca462d6e44b3b 100644
--- a/cc/occlusion_tracker_unittest.cc
+++ b/cc/occlusion_tracker_unittest.cc
@@ -134,12 +134,16 @@ struct OcclusionTrackerTestMainThreadTypes {
static LayerPtrType passLayerPtr(ContentLayerPtrType& layer)
{
- return layer.release();
+ LayerPtrType ref(layer);
+ layer = NULL;
danakj 2012/12/06 05:00:09 The NULL assignment seems unneeded. The callsite w
piman 2012/12/06 05:16:00 I wanted to keep the semantics that it cleared the
+ return ref;
}
static LayerPtrType passLayerPtr(LayerPtrType& layer)
{
- return layer.release();
+ LayerPtrType ref(layer);
+ layer = NULL;
+ return ref;
}
static void destroyLayer(LayerPtrType& layer)
« no previous file with comments | « base/memory/ref_counted.h ('k') | chrome/browser/extensions/api/downloads/downloads_api_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698