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

Unified Diff: src/ports/SkMutex_win.h

Issue 129533002: Fix TODO in SkMutex_win.h to prevent accidental copying. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 6 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: src/ports/SkMutex_win.h
===================================================================
--- src/ports/SkMutex_win.h (revision 12970)
+++ src/ports/SkMutex_win.h (working copy)
@@ -30,22 +30,9 @@
# undef NOMINMAX
#endif
-// TODO: this exists because SK_DECLARE_STATIC_ONCE in methods is currently
-// relying on a compiler bug which allows the '=' to work.
-// All use of SK_DECLARE_STATIC_ONCE in methods is unsafe, and must be removed.
-// To find these cases, make SkMutex's copy and assignement private directly.
-class SkNoncopyableMutex {
-public:
- SkNoncopyableMutex() { }
-
-private:
- SkNoncopyableMutex(const SkNoncopyableMutex&);
- SkNoncopyableMutex& operator=(const SkNoncopyableMutex&);
-};
-
// On Windows, SkBaseMutex and SkMutex are the same thing,
// we can't easily get rid of static initializers.
-class SkMutex : SkNoncopyableMutex {
+class SkMutex {
public:
SkMutex() {
InitializeCriticalSection(&fStorage);
@@ -64,6 +51,9 @@
}
private:
+ SkMutex(const SkMutex&);
+ SkMutex& operator=(const SkMutex&);
+
CRITICAL_SECTION fStorage;
};
« 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