Bug 1223193: P1. Make ImageBridgeChild::mShuttingDown atomic. r=nical
authorJean-Yves Avenard <jyavenard@mozilla.com>
Wed, 30 Dec 2015 15:13:19 +1100
changeset 318102 327f2836d54a5af75320de841c278c8df8a82a31
parent 318101 27b9d60e819cce5f20de8a0c48b1aa40522c7dd2
child 318103 7fd666d36af504854c5ba3c1204637c925b43102
push id8842
push usergijskruitbosch@gmail.com
push dateThu, 31 Dec 2015 13:04:55 +0000
reviewersnical
bugs1223193
milestone46.0a1
Bug 1223193: P1. Make ImageBridgeChild::mShuttingDown atomic. r=nical
gfx/layers/ipc/ImageBridgeChild.h
--- a/gfx/layers/ipc/ImageBridgeChild.h
+++ b/gfx/layers/ipc/ImageBridgeChild.h
@@ -4,16 +4,17 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef MOZILLA_GFX_IMAGEBRIDGECHILD_H
 #define MOZILLA_GFX_IMAGEBRIDGECHILD_H
 
 #include <stddef.h>                     // for size_t
 #include <stdint.h>                     // for uint32_t, uint64_t
 #include "mozilla/Attributes.h"         // for override
+#include "mozilla/Atomics.h"
 #include "mozilla/RefPtr.h"             // for already_AddRefed
 #include "mozilla/ipc/SharedMemory.h"   // for SharedMemory, etc
 #include "mozilla/layers/AsyncTransactionTracker.h" // for AsyncTransactionTrackerHolder
 #include "mozilla/layers/CanvasClient.h"
 #include "mozilla/layers/CompositableForwarder.h"
 #include "mozilla/layers/CompositorTypes.h"
 #include "mozilla/layers/PImageBridgeChild.h"
 #include "nsDebug.h"                    // for NS_RUNTIMEABORT
@@ -311,15 +312,15 @@ public:
 protected:
   ImageBridgeChild();
   bool DispatchAllocShmemInternal(size_t aSize,
                                   SharedMemory::SharedMemoryType aType,
                                   Shmem* aShmem,
                                   bool aUnsafe);
 
   CompositableTransaction* mTxn;
-  bool mShuttingDown;
+  Atomic<bool> mShuttingDown;
 };
 
 } // namespace layers
 } // namespace mozilla
 
 #endif