Bug 1709466: Don't prepare for process change when already discarded. r=nika

If a <browser> is removed in the middle of a process change, the previous
DocShell may be torn down while it's still expecting a process change. There's
really nothing more to do in that case, though, so we can just skip the
PrepareForProcessChange call rather than asserting.

Differential Revision: https://phabricator.services.mozilla.com/D118514
This commit is contained in:
Kris Maglione 2021-06-22 17:42:35 +00:00
Родитель a17b80b9e4
Коммит e477097b53
1 изменённых файлов: 1 добавлений и 1 удалений

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

@ -4513,7 +4513,7 @@ nsDocShell::Destroy() {
GetSessionHistory()->EvictLocalContentViewers();
}
if (mWillChangeProcess) {
if (mWillChangeProcess && !mBrowsingContext->IsDiscarded()) {
mBrowsingContext->PrepareForProcessChange();
}