Bug 834470: Release AsyncPanZoomController and friends. r=roc

This commit is contained in:
Chris Jones 2013-01-24 19:59:10 -08:00
parent 577d544684
commit ddf38346af
4 changed files with 16 additions and 1 deletions

View File

@ -192,6 +192,14 @@ AsyncPanZoomController::~AsyncPanZoomController() {
}
void
AsyncPanZoomController::Destroy()
{
// These memebrs can only be used on the controller/UI thread.
mGeckoContentController = nullptr;
mGestureEventListener = nullptr;
}
/* static */float
AsyncPanZoomController::GetTouchStartTolerance()
{

View File

@ -78,6 +78,12 @@ public:
// These methods must only be called on the controller/UI thread.
//
/**
* Shut down the controller/UI thread state and prepare to be
* deleted (which may happen from any thread).
*/
void Destroy();
/**
* General handler for incoming input events. Manipulates the frame metrics
* basde on what type of input it is. For example, a PinchGestureEvent will

View File

@ -183,7 +183,7 @@ protected:
// they are flinging multiple times in a row very quickly, probably trying to
// reach one of the extremes of the page.
int32_t mAcceleration;
nsRefPtr<AsyncPanZoomController> mAsyncPanZoomController;
AsyncPanZoomController* mAsyncPanZoomController;
};
class AxisX : public Axis {

View File

@ -802,6 +802,7 @@ RenderFrameParent::ActorDestroy(ActorDestroyReason why)
// Stop our content controller from requesting repaints of our
// content.
mContentController->ClearRenderFrame();
mPanZoomController->Destroy();
}
}