Make the guard-object macros, used to ensure a class can't accidentally be constructed only temporarily, JS_FRIEND_API-compatible, since they're being used in friend declarations now. rs=cdleary/luke, no bug
authorJeff Walden <jwalden@mit.edu>
Wed, 05 Oct 2011 15:21:53 -0700
changeset 78834 248708be515e60dcc745c2e979257c148e5549de
parent 78833 78e5fb1814903b507450b2a98c4e5a278ec6c4f8
child 78835 ec7d5860226317b4ab8a6b90f64de556fe01aaed
push id506
push userclegnitto@mozilla.com
push dateWed, 09 Nov 2011 02:03:18 +0000
treeherdermozilla-aurora@63587fc7bb93 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscdleary, luke, no
milestone10.0a1
Make the guard-object macros, used to ensure a class can't accidentally be constructed only temporarily, JS_FRIEND_API-compatible, since they're being used in friend declarations now. rs=cdleary/luke, no bug
js/src/jsutil.h
--- a/js/src/jsutil.h
+++ b/js/src/jsutil.h
@@ -584,33 +584,33 @@ class UnwantedForeground : public Foregr
  *   JS_GUARD_OBJECT_NOTIFIER_PARAM should be placed at the end of the
  *     parameters to each constructor of the guard object; it declares
  *     (ifdef DEBUG) an additional parameter.
  *   JS_GUARD_OBJECT_NOTIFIER_INIT is a statement that belongs in each
  *     constructor.  It uses the parameter declared by
  *     JS_GUARD_OBJECT_NOTIFIER_PARAM.
  */
 #ifdef DEBUG
-class JSGuardObjectNotifier
+class JS_FRIEND_API(JSGuardObjectNotifier)
 {
 private:
     bool* mStatementDone;
 public:
     JSGuardObjectNotifier() : mStatementDone(NULL) {}
 
     ~JSGuardObjectNotifier() {
         *mStatementDone = true;
     }
 
     void setStatementDone(bool *aStatementDone) {
         mStatementDone = aStatementDone;
     }
 };
 
-class JSGuardObjectNotificationReceiver
+class JS_FRIEND_API(JSGuardObjectNotificationReceiver)
 {
 private:
     bool mStatementDone;
 public:
     JSGuardObjectNotificationReceiver() : mStatementDone(false) {}
 
     ~JSGuardObjectNotificationReceiver() {
         /*