Bug 1226376 - Annotate StaticMutex with MOZ_ONLY_USED_TO_AVOID_STATIC_CONSTRUCTORS, r=nfroyd
☠☠ backed out by ae540161167a ☠ ☠
authorMichael Layzell <michael@thelayzells.com>
Thu, 19 Nov 2015 17:09:47 -0500
changeset 310143 aad9086f8efdb9b6b049234c13c0c0fd261a8c79
parent 310142 625248e1115c3a8423d008e87e6f63728586234f
child 310144 975af6bc574f57965594fe21fab64861212417e9
push id5513
push userraliiev@mozilla.com
push dateMon, 25 Jan 2016 13:55:34 +0000
treeherdermozilla-beta@5ee97dd05b5c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnfroyd
bugs1226376
milestone45.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1226376 - Annotate StaticMutex with MOZ_ONLY_USED_TO_AVOID_STATIC_CONSTRUCTORS, r=nfroyd
xpcom/base/StaticMutex.h
--- a/xpcom/base/StaticMutex.h
+++ b/xpcom/base/StaticMutex.h
@@ -21,17 +21,17 @@ namespace mozilla {
  * thread-safe manner the first time it's used.
  *
  * The same caveats that apply to StaticAutoPtr apply to StaticMutex.  In
  * particular, do not use StaticMutex as a stack variable or a class instance
  * variable, because this class relies on the fact that global variablies are
  * initialized to 0 in order to initialize mMutex.  It is only safe to use
  * StaticMutex as a global or static variable.
  */
-class StaticMutex
+class MOZ_ONLY_USED_TO_AVOID_STATIC_CONSTRUCTORS StaticMutex
 {
 public:
   // In debug builds, check that mMutex is initialized for us as we expect by
   // the compiler.  In non-debug builds, don't declare a constructor so that
   // the compiler can see that the constructor is trivial.
 #ifdef DEBUG
   StaticMutex()
   {