Bug 1206904 - Work around APZ crashes when dealing with nested content processes. r=botond

--HG--
extra : commitid : 7i5joysqaKR
This commit is contained in:
Kartikaya Gupta 2015-09-25 13:54:11 -04:00
Родитель a3d47ba1cd
Коммит 6efb2a41d1
1 изменённых файлов: 5 добавлений и 1 удалений

Просмотреть файл

@ -339,7 +339,11 @@ RenderFrameParent::GetApzcTreeManager()
// created and the static getter knows which CompositorParent is
// instantiated with this layers ID. That's why try to fetch it when
// we first need it and cache the result.
if (!mApzcTreeManager && mAsyncPanZoomEnabled) {
// Note: the IsParentProcess check is to deal with nested content process
// scenarios, since in those cases we can have RenderFrameParent instances
// in a child process, but the APZC machinery is not in that process. Bug
// 1020199 should fix this more comprehensively.
if (!mApzcTreeManager && mAsyncPanZoomEnabled && XRE_IsParentProcess()) {
mApzcTreeManager = CompositorParent::GetAPZCTreeManager(mLayersId);
}
return mApzcTreeManager.get();