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 d0a9d017e8
commit 2fc47d4df1
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