Bug 1814603 - Change more ContentParent::IsDead checks to ContentParent::IsShuttingDown. r=smaug

Differential Revision: https://phabricator.services.mozilla.com/D168995
This commit is contained in:
Jens Stutte 2023-02-07 18:07:19 +00:00
parent 003efc7f75
commit a5cf43833e

View File

@ -1611,7 +1611,7 @@ nsresult CanonicalBrowsingContext::PendingRemotenessChange::FinishTopContent() {
"non-remote iframes");
// Abort if our ContentParent died while process switching.
if (mContentParent && NS_WARN_IF(mContentParent->IsDead())) {
if (mContentParent && NS_WARN_IF(mContentParent->IsShuttingDown())) {
return NS_ERROR_FAILURE;
}
@ -1741,7 +1741,7 @@ nsresult CanonicalBrowsingContext::PendingRemotenessChange::FinishSubframe() {
// If we're creating a new remote browser, and the host process is already
// dead, abort the process switch.
if (mContentParent != embedderBrowser->Manager() &&
NS_WARN_IF(mContentParent->IsDead())) {
NS_WARN_IF(mContentParent->IsShuttingDown())) {
return NS_ERROR_FAILURE;
}