зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1507212 - Guard against the compositor receiving a delayed FlushApzRepaints message. r=botond
On Android the FlushApzRepaints API is used as part of the code flow of zooming/scrolling to a focused input field. In mochitests this code can run but the message might arrive late, after the test suite is down and the browser is shutting down. Depending on timing, the parent process compositor bridge instance might already have been cleared, in which case the code would crash/fail an assertion. This patch makes the code handle this case more gracefully. Differential Revision: https://phabricator.services.mozilla.com/D13941 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
2911ba07aa
Коммит
98366771cd
|
@ -515,11 +515,10 @@ void CrossProcessCompositorBridgeParent::FlushApzRepaints(
|
|||
MOZ_ASSERT(aLayersId.IsValid());
|
||||
const CompositorBridgeParent::LayerTreeState* state =
|
||||
CompositorBridgeParent::GetIndirectShadowTree(aLayersId);
|
||||
if (!state) {
|
||||
if (!state || !state->mParent) {
|
||||
return;
|
||||
}
|
||||
|
||||
MOZ_ASSERT(state->mParent);
|
||||
state->mParent->FlushApzRepaints(aLayersId);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче