Bug 1038855, part 1 - Use an nsRefPtr for AsyncPanZoomController::mSharedFrameMetricsBuffer. r=bjacob

This commit is contained in:
Andrew McCreight 2014-07-16 12:39:03 -07:00
parent 90a513401f
commit f37d0cf3c0
2 changed files with 1 additions and 3 deletions

View File

@ -723,7 +723,6 @@ AsyncPanZoomController::AsyncPanZoomController(uint64_t aLayersId,
mTreeManager(aTreeManager),
mScrollParentId(FrameMetrics::NULL_SCROLL_ID),
mAPZCId(sAsyncPanZoomControllerCount++),
mSharedFrameMetricsBuffer(nullptr),
mSharedLock(nullptr)
{
MOZ_COUNT_CTOR(AsyncPanZoomController);
@ -791,7 +790,6 @@ AsyncPanZoomController::Destroy()
{ // scope the lock
ReentrantMonitorAutoEnter lock(mMonitor);
delete mSharedFrameMetricsBuffer;
mSharedFrameMetricsBuffer = nullptr;
delete mSharedLock;
mSharedLock = nullptr;

View File

@ -968,7 +968,7 @@ private:
* shared FrameMeterics used in progressive tile painting. */
const uint32_t mAPZCId;
ipc::SharedMemoryBasic* mSharedFrameMetricsBuffer;
nsRefPtr<ipc::SharedMemoryBasic> mSharedFrameMetricsBuffer;
CrossProcessMutex* mSharedLock;
/**
* Called when ever mFrameMetrics is updated so that if it is being