Bug 1330184 - Use threadsafe refcounting for nsProfilerStartParams. r?njn draft
authorMarkus Stange <mstange@themasta.com>
Wed, 31 May 2017 00:35:15 -0400
changeset 586820 681c553af3bf8da81a331b2d61d214ea8e867f65
parent 586675 64def3fc572c55e2865f5adc570eb841fc759352
child 586821 af1132f4b56ba75adc864b029652d69c78d4056d
push id61536
push userbmo:mstange@themasta.com
push dateWed, 31 May 2017 04:36:41 +0000
reviewersnjn
bugs1330184
milestone55.0a1
Bug 1330184 - Use threadsafe refcounting for nsProfilerStartParams. r?njn MozReview-Commit-ID: HVihlkBr4r3
tools/profiler/gecko/nsProfilerStartParams.h
--- a/tools/profiler/gecko/nsProfilerStartParams.h
+++ b/tools/profiler/gecko/nsProfilerStartParams.h
@@ -8,17 +8,20 @@
 
 #include "nsIProfiler.h"
 #include "nsString.h"
 #include "nsTArray.h"
 
 class nsProfilerStartParams : public nsIProfilerStartParams
 {
 public:
-  NS_DECL_ISUPPORTS
+  // This class can be used on multiple threads. For example, it's used for the
+  // observer notification from profiler_start, which can run on any thread but
+  // posts the notification to the main thread.
+  NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIPROFILERSTARTPARAMS
 
   nsProfilerStartParams(uint32_t aEntries,
                         double aInterval,
                         uint32_t aFeatures,
                         const nsTArray<nsCString>& aFilters);
 
 private: