Bug 944703 - Part 5: make AllocShmemParams hold a strong reference to its ISurfaceAllocator - r=nical
authorBenoit Jacob <bjacob@mozilla.com>
Tue, 03 Dec 2013 13:44:38 -0500
changeset 174274 58b167ccb8e65f1a1dc2aecfd9252e71056113ef
parent 174273 30a25eb71609c984506669f57ba4e679f8000774
child 174275 31859d96678a7976d030d406050e1ffaf622fda0
push id445
push userffxbld
push dateMon, 10 Mar 2014 22:05:19 +0000
treeherdermozilla-release@dc38b741b04e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnical
bugs944703
milestone28.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 944703 - Part 5: make AllocShmemParams hold a strong reference to its ISurfaceAllocator - r=nical
gfx/layers/ipc/ImageBridgeChild.cpp
--- a/gfx/layers/ipc/ImageBridgeChild.cpp
+++ b/gfx/layers/ipc/ImageBridgeChild.cpp
@@ -824,17 +824,17 @@ ImageBridgeChild::AllocShmem(size_t aSiz
   } else {
     return DispatchAllocShmemInternal(aSize, aType, aShmem, false); // false: unsafe
   }
 }
 
 // NewRunnableFunction accepts a limited number of parameters so we need a
 // struct here
 struct AllocShmemParams {
-  ISurfaceAllocator* mAllocator;
+  RefPtr<ISurfaceAllocator> mAllocator;
   size_t mSize;
   ipc::SharedMemory::SharedMemoryType mType;
   ipc::Shmem* mShmem;
   bool mUnsafe;
   bool mSuccess;
 };
 
 static void ProxyAllocShmemNow(AllocShmemParams* aParams,