Bug 1777277 - Guard against infinite recursion in RemoteContentController::NotifyScaleGestureComplete(). r=mccr8

However, also add a MOZ_ASSERT because GetGeckoContentControllerForRoot()
returning a RemoteContentController here is unexpected and should be
investigated further.

Differential Revision: https://phabricator.services.mozilla.com/D150638
This commit is contained in:
Botond Ballo 2022-06-29 20:53:59 +00:00
parent 0ec6d36308
commit 1674044117

View File

@ -423,7 +423,10 @@ void RemoteContentController::NotifyScaleGestureCompleteInProcess(
RefPtr<GeckoContentController> rootController =
CompositorBridgeParent::GetGeckoContentControllerForRoot(aGuid.mLayersId);
if (rootController) {
rootController->NotifyScaleGestureComplete(aGuid, aScale);
MOZ_ASSERT(rootController != this);
if (rootController != this) {
rootController->NotifyScaleGestureComplete(aGuid, aScale);
}
}
}