Bug 1356317: Part 1 - Mark SurfaceMemoryReporter refcounting as threadsafe. r=njn

MozReview-Commit-ID: 9U5KLMyKSbk

--HG--
extra : rebase_source : e59990f3e52cf5cb6d552a8844d61f7fc5fbdfb4
This commit is contained in:
Kris Maglione 2017-05-29 22:04:30 -07:00
parent da2d5fecbf
commit 27a5a12045

View File

@ -472,7 +472,10 @@ public:
sSurfaceMemoryUsed[size_t(aType)] = sSurfaceMemoryUsed[size_t(aType)] + aBytes;
};
NS_DECL_ISUPPORTS
// This memory reporter is sometimes allocated on the compositor thread,
// but always released on the main thread, so its refcounting needs to be
// threadsafe.
NS_DECL_THREADSAFE_ISUPPORTS
NS_IMETHOD CollectReports(nsIHandleReportCallback *aHandleReport,
nsISupports *aData, bool aAnonymize) override