зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1471671 - Avoid crash with WebRender when the scroll metadata is unavailable. r=kats
We are seeing crash reports in the wild where there is no scroll metadata available for an ASR for a display item and its clip. It appears that in the non-WR path, it skips such items, so we should probably do the same thing with WebRender. If the scrolling ends up being wrong, hopefully a reproducible use case will make its way to use to further debug, as the crash reports have not yielded anything to date. Differential Revision: https://phabricator.services.mozilla.com/D9699
This commit is contained in:
Родитель
f14b341517
Коммит
3370375e1c
|
@ -292,9 +292,12 @@ ClipManager::DefineScrollLayers(const ActiveScrolledRoot* aASR,
|
||||||
|
|
||||||
Maybe<ScrollMetadata> metadata = aASR->mScrollableFrame->ComputeScrollMetadata(
|
Maybe<ScrollMetadata> metadata = aASR->mScrollableFrame->ComputeScrollMetadata(
|
||||||
mManager, aItem->ReferenceFrame(), Nothing(), nullptr);
|
mManager, aItem->ReferenceFrame(), Nothing(), nullptr);
|
||||||
MOZ_ASSERT(metadata);
|
if (!metadata) {
|
||||||
FrameMetrics& metrics = metadata->GetMetrics();
|
MOZ_ASSERT_UNREACHABLE("Expected scroll metadata to be available!");
|
||||||
|
return ancestorScrollId;
|
||||||
|
}
|
||||||
|
|
||||||
|
FrameMetrics& metrics = metadata->GetMetrics();
|
||||||
if (!metrics.IsScrollable()) {
|
if (!metrics.IsScrollable()) {
|
||||||
// This item is a scrolling no-op, skip over it in the ASR chain.
|
// This item is a scrolling no-op, skip over it in the ASR chain.
|
||||||
return ancestorScrollId;
|
return ancestorScrollId;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче