Bug 1405518: Make SyncObjectClient atomically refcounted as it may be accessed both on the paint and the main thread. r=dvander
authorBas Schouten <bschouten@mozilla.com>
Thu, 05 Oct 2017 20:08:18 +0200
changeset 384698 fb3f3e05a357e4255d93a45f0c41f1d63e499e0d
parent 384697 54758041419501bbeef2c2f9727f6ce2c7203e6a
child 384699 e5d6b9275cb40349897b000e52f352087ab1273c
push id95830
push userbschouten@mozilla.com
push dateThu, 05 Oct 2017 18:08:48 +0000
treeherdermozilla-inbound@fb3f3e05a357 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdvander
bugs1405518
milestone58.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 1405518: Make SyncObjectClient atomically refcounted as it may be accessed both on the paint and the main thread. r=dvander MozReview-Commit-ID: K0QvlGlXIIc
gfx/layers/SyncObject.h
--- a/gfx/layers/SyncObject.h
+++ b/gfx/layers/SyncObject.h
@@ -36,17 +36,17 @@ public:
   virtual SyncHandle GetSyncHandle() = 0;
 
   virtual bool Synchronize() = 0;
 
 protected:
   SyncObjectHost() { }
 };
 
-class SyncObjectClient : public RefCounted<SyncObjectClient>
+class SyncObjectClient : public external::AtomicRefCounted<SyncObjectClient>
 {
 public:
   MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(SyncObjectClient)
   virtual ~SyncObjectClient() { }
 
   static already_AddRefed<SyncObjectClient> CreateSyncObjectClient(SyncHandle aHandle
 #ifdef XP_WIN
                                                                      , ID3D11Device* aDevice = nullptr