Bug 1168843 - use thread-safe refcounting for shared memory surfaces to avoid shutdown crashes. r=jmuizelaar

This commit is contained in:
Lee Salzman 2015-05-27 11:20:26 -04:00
parent b43d654673
commit a2e0cf32cd
2 changed files with 4 additions and 2 deletions

View File

@ -78,7 +78,8 @@ public:
SystemProtect(aAddr, aSize, aRights);
}
NS_INLINE_DECL_REFCOUNTING(SharedMemory)
// bug 1168843, compositor thread may create shared memory instances that are destroyed by main thread on shutdown, so this must use thread-safe RC to avoid hitting assertion
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(SharedMemory)
static void SystemProtect(char* aAddr, size_t aSize, int aRights);
static size_t SystemPageSize();

View File

@ -35,7 +35,8 @@ class QWindow;
class gfxASurface;
class nsShmImage {
NS_INLINE_DECL_REFCOUNTING(nsShmImage)
// bug 1168843, compositor thread may create shared memory instances that are destroyed by main thread on shutdown, so this must use thread-safe RC to avoid hitting assertion
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(nsShmImage)
typedef mozilla::ipc::SharedMemorySysV SharedMemorySysV;