Bug 720759 - Export mfbt's guard object classes to avoid warnings using them in exported APIs. r=Ms2ger
authorJeff Walden <jwalden@mit.edu>
Tue, 24 Jan 2012 09:22:47 -0800
changeset 85258 bd75f26eee254c2b9bf1a22e18c304833060a7a0
parent 85257 04b4225269a45d7e5c2e2fbbe50a0cb37b881551
child 85259 6e849614a79fce45958fd7e92d62603b015d7a98
push id21915
push userbmo@edmorley.co.uk
push dateWed, 25 Jan 2012 14:16:23 +0000
treeherdermozilla-central@0d5ad6a6f814 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersMs2ger
bugs720759
milestone12.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 720759 - Export mfbt's guard object classes to avoid warnings using them in exported APIs. r=Ms2ger
mfbt/GuardObjects.h
--- a/mfbt/GuardObjects.h
+++ b/mfbt/GuardObjects.h
@@ -39,16 +39,17 @@
  * ***** END LICENSE BLOCK ***** */
 
 /* Implementation of macros to ensure correct use of RAII Auto* objects. */
 
 #ifndef mozilla_GuardObjects_h
 #define mozilla_GuardObjects_h
 
 #include "mozilla/Assertions.h"
+#include "mozilla/Types.h"
 
 #ifdef __cplusplus
 
 #ifdef DEBUG
 
 namespace mozilla {
 namespace detail {
 /*
@@ -94,34 +95,34 @@ namespace detail {
  *     a base class that also uses these macros
  *   MOZ_GUARD_OBJECT_NOTIFIER_INIT is a statement that belongs in each
  *     constructor. It uses the parameter declared by
  *     MOZ_GUARD_OBJECT_NOTIFIER_PARAM.
  *
  * For more details, and examples of using these macros, see
  * https://developer.mozilla.org/en/Using_RAII_classes_in_Mozilla
  */
-class GuardObjectNotifier
+class MOZ_EXPORT_API(GuardObjectNotifier)
 {
   private:
     bool* statementDone;
 
   public:
     GuardObjectNotifier() : statementDone(NULL) {}
 
     ~GuardObjectNotifier() {
         *statementDone = true;
     }
 
     void setStatementDone(bool* statementIsDone) {
         statementDone = statementIsDone;
     }
 };
 
-class GuardObjectNotificationReceiver
+class MOZ_EXPORT_API(GuardObjectNotificationReceiver)
 {
   private:
     bool statementDone;
 
   public:
     GuardObjectNotificationReceiver() : statementDone(false) {}
 
     ~GuardObjectNotificationReceiver() {