Bug 1155823 - Properly shutdown the CompositorVsyncDispatcher. r=kats

This commit is contained in:
Mason Chang 2015-04-29 08:48:31 -07:00
parent 68b7476b2e
commit 012ade9811

View File

@ -223,6 +223,12 @@ void nsBaseWidget::DestroyCompositor()
nsRefPtr<CompositorParent> compositorParent = mCompositorParent;
mCompositorChild->Destroy();
}
// Can have base widgets that are things like tooltips
// which don't have CompositorVsyncDispatchers
if (mCompositorVsyncDispatcher) {
mCompositorVsyncDispatcher->Shutdown();
}
}
void nsBaseWidget::DestroyLayerManager()
@ -264,11 +270,6 @@ nsBaseWidget::~nsBaseWidget()
#endif
delete mOriginalBounds;
// Can have base widgets that are things like tooltips which don't have CompositorVsyncDispatchers
if (mCompositorVsyncDispatcher) {
mCompositorVsyncDispatcher->Shutdown();
}
}
//-------------------------------------------------------------------------