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

Unified Diff: include/core/SkWeakRefCnt.h

Issue 25716003: Make it explicit that some validate methods are debug only ... (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 2 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 | « include/core/SkRefCnt.h ('k') | include/gpu/GrTexture.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkWeakRefCnt.h
===================================================================
--- include/core/SkWeakRefCnt.h (revision 11569)
+++ include/core/SkWeakRefCnt.h (working copy)
@@ -73,10 +73,12 @@
*/
int32_t getWeakCnt() const { return fWeakCnt; }
+#ifdef SK_DEBUG
void validate() const {
- SkRefCnt::validate();
+ this->INHERITED::validate();
SkASSERT(fWeakCnt > 0);
}
+#endif
/** Creates a strong reference from a weak reference, if possible. The
caller must already be an owner. If try_ref() returns true the owner
« no previous file with comments | « include/core/SkRefCnt.h ('k') | include/gpu/GrTexture.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698