Bug 1485023 - Replace checks for PresShells when suppressing displayports with assertions. r=kats

Differential Revision: https://phabricator.services.mozilla.com/D3905

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Mike Conley 2018-08-21 21:45:07 +00:00
Родитель 2878e48d64
Коммит 20644c9627
1 изменённых файлов: 6 добавлений и 6 удалений

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

@ -1963,9 +1963,9 @@ public:
}
mCallee = aCallee;
if (nsIPresShell* shell = mCallee->mOuter->PresShell()) {
shell->SuppressDisplayport(true);
}
nsIPresShell* shell = mCallee->mOuter->PresShell();
MOZ_ASSERT(shell);
shell->SuppressDisplayport(true);
return true;
}
@ -1983,9 +1983,9 @@ public:
void RemoveObserver() {
if (mCallee) {
RefreshDriver(mCallee)->RemoveRefreshObserver(this, FlushType::Style);
if (nsIPresShell* shell = mCallee->mOuter->PresShell()) {
shell->SuppressDisplayport(false);
}
nsIPresShell* shell = mCallee->mOuter->PresShell();
MOZ_ASSERT(shell);
shell->SuppressDisplayport(false);
mCallee = nullptr;
}
}