Bug 1330184 - Use threadsafe refcounting for nsProfilerStartParams. r=njn
authorMarkus Stange <mstange@themasta.com>
Wed, 31 May 2017 00:35:15 -0400
changeset 361502 640a7914237719f196d8286410efa18bea33902e
parent 361501 15728eea17988c229b64b5d14df6e8eb15cd529e
child 361503 ac273d41a04478e7d380010cd1d1cab98d29a45c
push id90875
push usercbook@mozilla.com
push dateWed, 31 May 2017 12:23:54 +0000
treeherdermozilla-inbound@7061759a0b57 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnjn
bugs1330184
milestone55.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 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: