Bug 1392885 -Add debug message when misusing the guard object. r=froydnj
authorJames Cheng <jacheng@mozilla.com>
Wed, 23 Aug 2017 11:59:21 +0800
changeset 376340 5175f4c659a32f91be7b39f7edf00027b9d395ce
parent 376339 be0f7ac59f25ba9931211ed394d60826bdcf69a3
child 376341 e903ef2fd85ac817ddec48499515c3704f57b758
push id32382
push userkwierso@gmail.com
push dateWed, 23 Aug 2017 23:07:08 +0000
treeherdermozilla-central@f0abd25e1f4a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfroydnj
bugs1392885
milestone57.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 1392885 -Add debug message when misusing the guard object. r=froydnj MozReview-Commit-ID: 78iFX5qUcTC
mfbt/GuardObjects.h
--- a/mfbt/GuardObjects.h
+++ b/mfbt/GuardObjects.h
@@ -111,17 +111,17 @@ public:
   GuardObjectNotificationReceiver() : mStatementDone(false) { }
 
   ~GuardObjectNotificationReceiver() {
     /*
      * Assert that the guard object was not used as a temporary.  (Note that
      * this assert might also fire if init is not called because the guard
      * object's implementation is not using the above macros correctly.)
      */
-    MOZ_ASSERT(mStatementDone);
+    MOZ_ASSERT(mStatementDone, "Guard object should not be used as a temporary.");
   }
 
   void init(GuardObjectNotifier& aNotifier)
   {
     aNotifier.setStatementDone(&mStatementDone);
   }
 };